Class: CircuitBreaker::WorkflowBuilder::DSL::ActionContext
- Inherits:
-
Object
- Object
- CircuitBreaker::WorkflowBuilder::DSL::ActionContext
show all
- Defined in:
- lib/circuit_breaker/workflow_dsl.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ActionContext.
30
31
32
|
# File 'lib/circuit_breaker/workflow_dsl.rb', line 30
def initialize
@results = {}
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
42
43
44
|
# File 'lib/circuit_breaker/workflow_dsl.rb', line 42
def method_missing(name, *args)
@results[name]
end
|
Instance Attribute Details
#results ⇒ Object
Returns the value of attribute results.
28
29
30
|
# File 'lib/circuit_breaker/workflow_dsl.rb', line 28
def results
@results
end
|
Instance Method Details
#add_result(name, result) ⇒ Object
34
35
36
|
# File 'lib/circuit_breaker/workflow_dsl.rb', line 34
def add_result(name, result)
@results[name] = result if name
end
|
#get_result(name) ⇒ Object
38
39
40
|
# File 'lib/circuit_breaker/workflow_dsl.rb', line 38
def get_result(name)
@results[name]
end
|
#respond_to_missing?(name, include_private = false) ⇒ Boolean
46
47
48
|
# File 'lib/circuit_breaker/workflow_dsl.rb', line 46
def respond_to_missing?(name, include_private = false)
@results.key?(name) || super
end
|