class Rebels::Fakes::FakeRand

Public Instance Methods

hex() click to toggle source
# File lib/rebels/fakes/fake_rand.rb, line 6
def hex
  nextt('hex')
end
uuid() click to toggle source
# File lib/rebels/fakes/fake_rand.rb, line 2
def uuid
  nextt('uuid')
end

Private Instance Methods

nextt(pref) click to toggle source
# File lib/rebels/fakes/fake_rand.rb, line 12
def nextt(pref)
  @map ||={}
  @map[pref] ||= -1
  @map[pref] += 1
  "#{pref}#{@map[pref]}"
end