Method: Aio::Module::InputStyle::Console::CmdContext#done
- Defined in:
- lib/modules/input/style/console.rb
#done ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/modules/input/style/console.rb', line 61 def done # 当之前有cmd内容的时候,比较两个的长度 # 长的保留 info_idx = has_cmd? if info_idx if @all_info[info_idx][2].size < context.size @all_info[info_idx][2] = context end else # 如果都没有,那么就直接添加 @all_info << [device_name, cmd, context] end self.clear end |