Class: SmashTheState::Operation::Step
- Inherits:
-
Object
- Object
- SmashTheState::Operation::Step
- Defined in:
- lib/smash_the_state/operation/step.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#error_handler ⇒ Object
Returns the value of attribute error_handler.
-
#implementation ⇒ Object
readonly
Returns the value of attribute implementation.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(step_name, options = {}, &block) ⇒ Step
constructor
A new instance of Step.
- #side_effect_free? ⇒ Boolean
Constructor Details
#initialize(step_name, options = {}, &block) ⇒ Step
Returns a new instance of Step.
7 8 9 10 11 12 13 14 |
# File 'lib/smash_the_state/operation/step.rb', line 7 def initialize(step_name, = {}, &block) @name = step_name @implementation = block @options = { # defaults side_effect_free: nil # nil roughly implies unknown }.merge() end |
Instance Attribute Details
#error_handler ⇒ Object
Returns the value of attribute error_handler.
4 5 6 |
# File 'lib/smash_the_state/operation/step.rb', line 4 def error_handler @error_handler end |
#implementation ⇒ Object (readonly)
Returns the value of attribute implementation.
5 6 7 |
# File 'lib/smash_the_state/operation/step.rb', line 5 def implementation @implementation end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/smash_the_state/operation/step.rb', line 5 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/smash_the_state/operation/step.rb', line 5 def @options end |
Instance Method Details
#side_effect_free? ⇒ Boolean
16 17 18 |
# File 'lib/smash_the_state/operation/step.rb', line 16 def side_effect_free? [:side_effect_free] == true end |