Class: ICSP::Commands::BaseCommand
- Inherits:
-
Object
- Object
- ICSP::Commands::BaseCommand
- Defined in:
- lib/commands/base_command.rb
Direct Known Subclasses
Certificate::Delete, Certificate::Install, Certificate::List, Certificate::View, Container::ChangePinCode, Container::Check, Container::Copy, Container::Delete, Container::ForgetAllPinCodes, Container::List, Container::View, CreateHash, CreateSignature, DecryptFile, EncryptFile, Hardware::List, License::Set, License::View, VerifyHash, VerifySignature
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#prompt ⇒ Object
readonly
Returns the value of attribute prompt.
Instance Method Summary collapse
-
#initialize(config:, options:, arguments:) ⇒ BaseCommand
constructor
A new instance of BaseCommand.
Constructor Details
#initialize(config:, options:, arguments:) ⇒ BaseCommand
Returns a new instance of BaseCommand.
6 7 8 9 10 11 12 13 14 |
# File 'lib/commands/base_command.rb', line 6 def initialize(config:, options:, arguments:) @config = config @options = @arguments = arguments @prompt = TTY::Prompt.new ::ICSP.logger.debug('Command initialized with:') ::ICSP.logger.debug("arguments: #{@arguments.inspect}") ::ICSP.logger.debug("options: #{@options.inspect}") end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
16 17 18 |
# File 'lib/commands/base_command.rb', line 16 def arguments @arguments end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
16 17 18 |
# File 'lib/commands/base_command.rb', line 16 def config @config end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
16 17 18 |
# File 'lib/commands/base_command.rb', line 16 def @options end |
#prompt ⇒ Object (readonly)
Returns the value of attribute prompt.
16 17 18 |
# File 'lib/commands/base_command.rb', line 16 def prompt @prompt end |