Class: RainforestRubyRuntime::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/rainforest_ruby_runtime/test.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, action:, response:, &block) ⇒ Step

Returns a new instance of Step.



37
38
39
40
41
42
# File 'lib/rainforest_ruby_runtime/test.rb', line 37

def initialize(id: , action: , response: , &block)
  @id = id
  @action = action
  @response = response
  @block = block
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



35
36
37
# File 'lib/rainforest_ruby_runtime/test.rb', line 35

def action
  @action
end

#idObject (readonly)

Returns the value of attribute id.



35
36
37
# File 'lib/rainforest_ruby_runtime/test.rb', line 35

def id
  @id
end

#responseObject (readonly)

Returns the value of attribute response.



35
36
37
# File 'lib/rainforest_ruby_runtime/test.rb', line 35

def response
  @response
end

Instance Method Details

#runObject



44
45
46
# File 'lib/rainforest_ruby_runtime/test.rb', line 44

def run
  @block.call
end