Class: Fabrication::Schematic::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/fabrication/schematic/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Runner

Returns a new instance of Runner.



6
7
8
# File 'lib/fabrication/schematic/runner.rb', line 6

def initialize(klass)
  self.klass = klass
end

Instance Attribute Details

#klassObject

Returns the value of attribute klass.



4
5
6
# File 'lib/fabrication/schematic/runner.rb', line 4

def klass
  @klass
end

Instance Method Details

#sequence(name = Fabrication::Sequencer::DEFAULT, start = nil, &block) ⇒ Object



10
11
12
13
# File 'lib/fabrication/schematic/runner.rb', line 10

def sequence(name = Fabrication::Sequencer::DEFAULT, start = nil, &block)
  name = "#{klass.to_s.downcase.gsub(/::/, '_')}_#{name}"
  Fabrication::Sequencer.sequence(name, start, &block)
end