Class: Ardb::CLI::InvalidCommand
- Inherits:
-
Object
- Object
- Ardb::CLI::InvalidCommand
- Defined in:
- lib/ardb/cli.rb,
lib/ardb/cli.rb
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#clirb ⇒ Object
readonly
Returns the value of attribute clirb.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #help ⇒ Object
-
#initialize(name) ⇒ InvalidCommand
constructor
A new instance of InvalidCommand.
- #new(args) ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(name) ⇒ InvalidCommand
Returns a new instance of InvalidCommand.
75 76 77 78 79 |
# File 'lib/ardb/cli.rb', line 75 def initialize(name) @name = name @argv = [] @clirb = Ardb::CLIRB.new end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
73 74 75 |
# File 'lib/ardb/cli.rb', line 73 def argv @argv end |
#clirb ⇒ Object (readonly)
Returns the value of attribute clirb.
73 74 75 |
# File 'lib/ardb/cli.rb', line 73 def clirb @clirb end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
73 74 75 |
# File 'lib/ardb/cli.rb', line 73 def name @name end |
Instance Method Details
#help ⇒ Object
92 93 94 95 96 |
# File 'lib/ardb/cli.rb', line 92 def help "Usage: ardb [COMMAND] [options]\n\n" \ "Commands: #{COMMANDS.keys.sort.join(', ')}\n" \ "Options: #{@clirb}" end |
#new(args) ⇒ Object
81 82 83 84 |
# File 'lib/ardb/cli.rb', line 81 def new(args) @argv = [@name, args].flatten.compact self end |