Class: ICSP::Commands::Hardware::List
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- ICSP::Commands::Hardware::List
- Defined in:
- lib/commands/hardware/list.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
#arguments, #config, #options, #prompt
Instance Method Summary collapse
Methods inherited from BaseCommand
Constructor Details
This class inherits a constructor from ICSP::Commands::BaseCommand
Instance Method Details
#cpconfig ⇒ Object
7 8 9 |
# File 'lib/commands/hardware/list.rb', line 7 def cpconfig @cpconfig ||= @config.cpconfig end |
#execute ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/commands/hardware/list.rb', line 11 def execute type = [:type] || 'reader' result = ::ICSP::Shell.new("#{cpconfig} -hardware #{type} -view").execute exit(result.exit_code) unless result.ok puts result end |