Class: ResetCommand

Inherits:
Command show all
Defined in:
lib/replicant/commands/reset_command.rb

Constant Summary

Constants included from Styles

Styles::CONSOLE_WIDTH, Styles::REPL_OUT, Styles::STYLES

Instance Attribute Summary

Attributes inherited from Command

#args

Instance Method Summary collapse

Methods inherited from Command

all, #execute, inherited, #initialize, load, #name, #usage

Methods included from Styles

#create_style, #end_style, #styled_text

Constructor Details

This class inherits a constructor from Command

Instance Method Details

#descriptionObject



3
4
5
# File 'lib/replicant/commands/reset_command.rb', line 3

def description
  "clear current device and package"
end

#runObject



11
12
13
14
# File 'lib/replicant/commands/reset_command.rb', line 11

def run
  @repl.default_device = nil
  @repl.default_package = nil
end

#valid_args?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/replicant/commands/reset_command.rb', line 7

def valid_args?
  args.blank?
end