Class: CityPair

Inherits:
Object show all
Defined in:
lib/models/city_pair.rb

Instance Method Summary collapse

Instance Method Details

#after_initializeObject



6
7
8
# File 'lib/models/city_pair.rb', line 6

def after_initialize
  set_kids if new?
end

#set_kidsObject



10
11
12
13
14
15
16
# File 'lib/models/city_pair.rb', line 10

def set_kids
  self.kid_date = rand(65535)
  self.kid_time = rand(65535)
  self.kid_comm = rand(255)
  self.kid_mult = rand(255)
  self.kid_user = String.random_of_length(4)
end