Class: Evinrude::StateMachine::Register

Inherits:
Evinrude::StateMachine show all
Defined in:
lib/evinrude/state_machine/register.rb

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ Register

Returns a new instance of Register.



6
7
8
9
10
# File 'lib/evinrude/state_machine/register.rb', line 6

def initialize(**kwargs)
	super

	@state = kwargs.fetch(:snapshot, "")
end

Instance Method Details

#current_stateObject



16
17
18
# File 'lib/evinrude/state_machine/register.rb', line 16

def current_state
	@state
end

#process_command(s) ⇒ Object



12
13
14
# File 'lib/evinrude/state_machine/register.rb', line 12

def process_command(s)
	@state = s
end

#snapshotObject



20
21
22
# File 'lib/evinrude/state_machine/register.rb', line 20

def snapshot
	@state
end