Class: Obake::State

Inherits:
Object
  • Object
show all
Defined in:
lib/obake/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ State

Returns a new instance of State.



5
6
7
# File 'lib/obake/state.rb', line 5

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/obake/state.rb', line 3

def id
  @id
end

Instance Method Details

#exit(next_state_id, data = {}) ⇒ Object



17
18
19
# File 'lib/obake/state.rb', line 17

def exit(next_state_id, data = {})
  @fsm.change_state(Transition.new(next_state_id, data))
end

#on_enter(data) ⇒ Object



9
10
11
# File 'lib/obake/state.rb', line 9

def on_enter(data)

end

#on_exitObject



13
14
15
# File 'lib/obake/state.rb', line 13

def on_exit

end