Class: Chandler::CLI::Parser
- Inherits:
-
Object
- Object
- Chandler::CLI::Parser
- Includes:
- Logging
- Defined in:
- lib/chandler/cli/parser.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(args, config = Chandler::Configuration.new) ⇒ Parser
constructor
A new instance of Parser.
- #usage ⇒ Object
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 end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
10 11 12 |
# File 'lib/chandler/cli/parser.rb', line 10 def args @args end |
#config ⇒ Object (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
#usage ⇒ Object
18 19 20 |
# File 'lib/chandler/cli/parser.rb', line 18 def usage option_parser.to_s end |