class Aio::Parse::ParserMachine
Attributes
device_manager[R]
state[R]
保存状态机的状态
Public Class Methods
new(device_manager)
click to toggle source
# File lib/aio/core/parse/parser_machine.rb, line 15 def initialize(device_manager) @device_manager = device_manager @no_device_state = Aio::Parse::NoDeviceState.new(self) @has_device_state = Aio::Parse::HasDeviceState.new(self) @full_state = Aio::Parse::FullState.new(self) @state = @no_device_state end
Public Instance Methods
get_device(opts)
click to toggle source
# File lib/aio/core/parse/parser_machine.rb, line 25 def get_device(opts) @state.get_device(opts) end
get_full(opts)
click to toggle source
# File lib/aio/core/parse/parser_machine.rb, line 29 def get_full(opts) @state.get_full(opts) end
to_full_state()
click to toggle source
# File lib/aio/core/parse/parser_machine.rb, line 42 def to_full_state @state = @full_state end
to_has_device_state()
click to toggle source
# File lib/aio/core/parse/parser_machine.rb, line 38 def to_has_device_state @state = @has_device_state end
to_no_device_state()
click to toggle source
状态的切换
# File lib/aio/core/parse/parser_machine.rb, line 34 def to_no_device_state @state = @no_device_state end