Class: StatefulModelRails::Transition

Inherits:
Object
  • Object
show all
Defined in:
lib/stateful_model_rails/transition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fromObject (readonly)

Returns the value of attribute from.



4
5
6
# File 'lib/stateful_model_rails/transition.rb', line 4

def from
  @from
end

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