Class: StepMachine::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/step_machine/group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Group

Returns a new instance of Group.



7
8
9
# File 'lib/step_machine/group.rb', line 7

def initialize(name)
  @name = name
end

Instance Attribute Details

#condition_blockObject (readonly)

Returns the value of attribute condition_block.



5
6
7
# File 'lib/step_machine/group.rb', line 5

def condition_block
  @condition_block
end

#first_stepObject

Returns the value of attribute first_step.



4
5
6
# File 'lib/step_machine/group.rb', line 4

def first_step
  @first_step
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/step_machine/group.rb', line 4

def name
  @name
end

Instance Method Details

#condition(&block) ⇒ Object



11
12
13
14
# File 'lib/step_machine/group.rb', line 11

def condition(&block)
  @condition_block = block if block      
  self
end