Class: Mago::Cli::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/mago/cli/command.rb

Overview

CLI command.

Examples:

command = Mago::Cli::Command('-s', '-i', '0,1,2', './lib')
command.execute

Instance Method Summary collapse

Constructor Details

#initialize(arguments) ⇒ Command

Returns a new instance of Command.

Parameters:

  • arguments (Array<String>)

    command arguments



10
11
12
13
# File 'lib/mago/cli/command.rb', line 10

def initialize(arguments)
  @arguments = arguments
  @config    = Config.new
end

Instance Method Details

#executevoid

This method returns an undefined value.

Execute command.



18
19
20
21
# File 'lib/mago/cli/command.rb', line 18

def execute
  parse_arguments
  run
end