Class: StepMachine::Group
- Inherits:
-
Object
- Object
- StepMachine::Group
- Defined in:
- lib/step_machine/group.rb
Instance Attribute Summary collapse
-
#condition_block ⇒ Object
readonly
Returns the value of attribute condition_block.
-
#first_step ⇒ Object
Returns the value of attribute first_step.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #condition(&block) ⇒ Object
-
#initialize(name) ⇒ Group
constructor
A new instance of Group.
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_block ⇒ Object (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_step ⇒ Object
Returns the value of attribute first_step.
4 5 6 |
# File 'lib/step_machine/group.rb', line 4 def first_step @first_step end |
#name ⇒ Object
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 |