Class: StatefulModelRails::Transition
- Inherits:
-
Object
- Object
- StatefulModelRails::Transition
- Defined in:
- lib/stateful_model_rails/transition.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) ⇒ Transition
constructor
A new instance of Transition.
Constructor Details
#initialize(from, to) ⇒ Transition
Returns a new instance of Transition.
6 7 8 9 |
# File 'lib/stateful_model_rails/transition.rb', line 6 def initialize(from, to) @from = from @to = to end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
4 5 6 |
# File 'lib/stateful_model_rails/transition.rb', line 4 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
4 5 6 |
# File 'lib/stateful_model_rails/transition.rb', line 4 def to @to end |
Instance Method Details
#==(other) ⇒ Object
11 12 13 |
# File 'lib/stateful_model_rails/transition.rb', line 11 def ==(other) from == other.from && to == other.to end |