Class: Aio::Parse::NoDeviceState

Inherits:
ParentState show all
Defined in:
lib/aio/core/parse/parser_machine/no_device_state.rb

Instance Method Summary collapse

Methods inherited from ParentState

#device_manager, #get_full, #initialize

Constructor Details

This class inherits a constructor from Aio::Parse::ParentState

Instance Method Details

#get_device(opts = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/aio/core/parse/parser_machine/no_device_state.rb', line 4

def get_device(opts={})
  # 首先判断是否已经存在,但是这是初始状态,所以一定没有
  self.device_manager.add_device(opts)

  @machine.to_has_device_state
end