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.
40 41 42 43 44 45 46 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 40 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.
38 39 40 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 38 def action @action end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
38 39 40 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 38 def id @id end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
38 39 40 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 38 def response @response end |
Instance Method Details
#run ⇒ Object
48 49 50 51 52 |
# File 'lib/rainforest_ruby_runtime/test.rb', line 48 def run @callback.before_step(self) @block.call @callback.after_step(self) end |