Class: IV::CLI::Command

Inherits:
Object
  • Object
show all
Includes:
Helpers::Errors, Mixlib::CLI
Defined in:
lib/iv-cli/command.rb

Direct Known Subclasses

Init, Nodes

Defined Under Namespace

Classes: Init, Nodes

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Helpers::Errors

#fail

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



7
8
9
# File 'lib/iv-cli/command.rb', line 7

def config
  @config
end

Class Method Details

.invalid_command?(command) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/iv-cli/command.rb', line 13

def self.invalid_command? command
  ! commands.include? command
end

.run_command(args, options = {}) ⇒ Object



9
10
11
# File 'lib/iv-cli/command.rb', line 9

def self.run_command args, options = {}
  command_class(args.shift).new.run(args, options)
end