Class: CircuitBreaker::WorkflowBuilder::DSL::StateTransition

Inherits:
Object
  • Object
show all
Defined in:
lib/circuit_breaker/workflow_dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fromObject (readonly)

Returns the value of attribute from.



11
12
13
# File 'lib/circuit_breaker/workflow_dsl.rb', line 11

def from
  @from
end

#toObject (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_sObject



22
23
24
# File 'lib/circuit_breaker/workflow_dsl.rb', line 22

def to_s
  "#{from} -> #{to}"
end