Class: Aio::Module::InputStyle::Console::EmptyState

Inherits:
State
  • Object
show all
Defined in:
lib/modules/input/style/console.rb

Instance Method Summary collapse

Methods inherited from State

#cmd_context, #initialize

Methods included from Ui::Verbose

#clear_line, #print_error, #print_good, #progress_bar

Constructor Details

This class inherits a constructor from Aio::Module::InputStyle::Console::State

Instance Method Details

#parse_line(line) ⇒ Object



107
108
109
110
111
112
113
114
115
116
117
# File 'lib/modules/input/style/console.rb', line 107

def parse_line(line)

  # 当前是空的状态
  # 判断当前行有没有模块中的命令
  line = Aio::Base::Toolkit::String.safe(line)
  return if line.include?('Command is')
  return unless @machine.regs.match(line)

  @machine.to_cmd_state
  @machine.parse_line(line)
end