Class: Chandler::CLI

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Logging
Defined in:
lib/chandler/cli.rb,
lib/chandler/cli/parser.rb

Overview

Handles constructing and invoking the appropriate chandler command based on command line arguments and options provided by the CLI::Parser. Essentially this is the “router” for the command-line app.

Defined Under Namespace

Classes: Parser

Instance Method Summary collapse

Constructor Details

#initialize(parser: Chandler::CLI::Parser.new(ARGV)) ⇒ CLI

Returns a new instance of CLI.



17
18
19
# File 'lib/chandler/cli.rb', line 17

def initialize(parser: Chandler::CLI::Parser.new(ARGV))
  @parser = parser
end

Instance Method Details

#runObject



21
22
23
# File 'lib/chandler/cli.rb', line 21

def run
  command.call
end