Class: CircuitBreaker::WorkflowBuilder::DSL::StateTransition
- Inherits:
-
Object
- Object
- CircuitBreaker::WorkflowBuilder::DSL::StateTransition
- Defined in:
- lib/circuit_breaker/workflow_dsl.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #>>(other) ⇒ Object
-
#initialize(from, to) ⇒ StateTransition
constructor
A new instance of StateTransition.
- #to_s ⇒ Object
Constructor Details
#initialize(from, to) ⇒ StateTransition
Returns a new instance of StateTransition.
13 14 15 16 |
# File 'lib/circuit_breaker/workflow_dsl.rb', line 13 def initialize(from, to) @from = from @to = to end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
11 12 13 |
# File 'lib/circuit_breaker/workflow_dsl.rb', line 11 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
11 12 13 |
# File 'lib/circuit_breaker/workflow_dsl.rb', line 11 def to @to end |
Instance Method Details
#>>(other) ⇒ Object
18 19 20 |
# File 'lib/circuit_breaker/workflow_dsl.rb', line 18 def >>(other) StateTransition.new(from, other) end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/circuit_breaker/workflow_dsl.rb', line 22 def to_s "#{from} -> #{to}" end |