Module: FakeData

Defined in:
lib/fake_data.rb,
lib/fake_data/method.rb,
lib/fake_data/version.rb,
lib/fake_data/structure.rb,
lib/fake_data/method/faker.rb,
lib/fake_data/method/control.rb

Defined Under Namespace

Classes: Method, Structure

Constant Summary collapse

VERSION =
"1.0.1"

Class Method Summary collapse

Class Method Details

.debug(object) ⇒ Object



23
24
25
# File 'lib/fake_data.rb', line 23

def debug object
  Structure.object_to_source(object)
end

.generator(object) ⇒ Object



19
20
21
# File 'lib/fake_data.rb', line 19

def generator object
  Structure.object_to_lambda(object)
end

.locale=(locale) ⇒ Object



11
12
13
# File 'lib/fake_data.rb', line 11

def locale=(locale)
  Faker::Config.locale = locale
end

.once(object) ⇒ Object



15
16
17
# File 'lib/fake_data.rb', line 15

def once object
  generator(object).call
end