Class: Yawl::Steps::SetDefiner

Inherits:
Object
  • Object
show all
Defined in:
lib/yawl/steps/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ SetDefiner

Returns a new instance of SetDefiner.



8
9
10
11
12
# File 'lib/yawl/steps/base.rb', line 8

def initialize(name, &block)
  @name = name
  @step_names = []
  @block = block
end

Instance Attribute Details

#step_namesObject (readonly)

Returns the value of attribute step_names.



6
7
8
# File 'lib/yawl/steps/base.rb', line 6

def step_names
  @step_names
end

Instance Method Details

#runObject



14
15
16
# File 'lib/yawl/steps/base.rb', line 14

def run
  instance_eval(&@block)
end

#step(name, &block) ⇒ Object



18
19
20
21
22
# File 'lib/yawl/steps/base.rb', line 18

def step(name, &block)
  Steps.step(name, &block).tap do |k|
    step_names.push(k.name)
  end
end