Class: Chandler::CLI::Parser

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, config = Chandler::Configuration.new) ⇒ Parser

Returns a new instance of Parser.



12
13
14
15
16
# File 'lib/chandler/cli/parser.rb', line 12

def initialize(args, config=Chandler::Configuration.new)
  @args = args
  @config = config
  parse_options
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



10
11
12
# File 'lib/chandler/cli/parser.rb', line 10

def args
  @args
end

#configObject (readonly)

Returns the value of attribute config.



10
11
12
# File 'lib/chandler/cli/parser.rb', line 10

def config
  @config
end

Instance Method Details

#usageObject



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

def usage
  option_parser.to_s
end