Class: SimplerStateMachine::Transition

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

Overview

:nodoc

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Transition

Returns a new instance of Transition.



7
8
9
10
11
# File 'lib/simpler_state_machine/transition.rb', line 7

def initialize(options = {})
  options.assert_valid_keys :from, :to
  @to = options[:to]
  @from = options[:from]
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



5
6
7
# File 'lib/simpler_state_machine/transition.rb', line 5

def from
  @from
end

#toObject

Returns the value of attribute to.



5
6
7
# File 'lib/simpler_state_machine/transition.rb', line 5

def to
  @to
end