Module: Dummy

Defined in:
lib/dummy.rb,
lib/dummy/name.rb,
lib/dummy/lorem.rb,
lib/dummy/address.rb,
lib/dummy/company.rb,
lib/dummy/internet.rb,
lib/dummy/geolocation.rb,
lib/dummy/phone_number.rb

Defined Under Namespace

Modules: Address, Company, Geolocation, Internet, Lorem, Name, PhoneNumber

Class Method Summary collapse

Class Method Details

.magic_data(field, type) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/dummy.rb', line 14

def magic_data(field, type)
  case type
  when :string, :text then magic_string(field, type)
  when :integer then magic_integer(field)
  when :date, :datetime then magic_date(field)
  when :decimal, :float then magic_float(field)
  when :boolean then rand(2)
  else false
  end
end