Method: Finitio::Generation#call

Defined in:
lib/finitio/generation.rb

#call(type, world = nil) ⇒ Object



85
86
87
88
89
90
91
92
93
# File 'lib/finitio/generation.rb', line 85

def call(type, world = nil)
  if gen = generators[type.name]
    gen.call(type, self, world)
  elsif exs = type. && type.[:examples]
    flip_one_out_of(exs)
  else
    type.generate_data(self, world)
  end
end