Class: RainforestRubyRuntime::Step
- Inherits:
-
Object
- Object
- RainforestRubyRuntime::Step
- Defined in:
- lib/rainforest_ruby_runtime/test.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(id:, action:, response:, callback:, &block) ⇒ Step
constructor
A new instance of Step.
- #run ⇒ Object
Constructor Details
#initialize(id:, action:, response:, callback:, &block) ⇒ Step
Returns a new instance of Step.
23 24 25 26 27 28 29 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 23 def initialize(id: , action: , response: , callback: , &block) @id = id @action = action @response = response @block = block @callback = callback end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
21 22 23 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 21 def action @action end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
21 22 23 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 21 def id @id end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
21 22 23 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 21 def response @response end |
Instance Method Details
#run ⇒ Object
31 32 33 34 35 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 31 def run @callback.before_step(self) @block.call @callback.after_step(self) end |