Class: Population::Definition::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/population/definition.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run(block) ⇒ Object



13
14
15
# File 'lib/population/definition.rb', line 13

def self.run(block)
  new.instance_eval(&block)
end

Instance Method Details

#populate(name, &block) ⇒ Object



8
9
10
11
# File 'lib/population/definition.rb', line 8

def populate(name, &block)
  populate = Populate.new(name, &block)
  Population.register_populate(populate)
end