Class: Cukunity::CLI::ArgumentParser
- Inherits:
-
Object
- Object
- Cukunity::CLI::ArgumentParser
- Defined in:
- lib/cukunity/cli/argument_parser.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#cucumber_args ⇒ Object
readonly
Returns the value of attribute cucumber_args.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#remaining_args ⇒ Object
readonly
Returns the value of attribute remaining_args.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ ArgumentParser
constructor
A new instance of ArgumentParser.
- #parse ⇒ Object
Constructor Details
#initialize(args) ⇒ ArgumentParser
Returns a new instance of ArgumentParser.
17 18 19 |
# File 'lib/cukunity/cli/argument_parser.rb', line 17 def initialize(args) @args = args.dup end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
6 7 8 |
# File 'lib/cukunity/cli/argument_parser.rb', line 6 def args @args end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
10 11 12 |
# File 'lib/cukunity/cli/argument_parser.rb', line 10 def command @command end |
#cucumber_args ⇒ Object (readonly)
Returns the value of attribute cucumber_args.
8 9 10 |
# File 'lib/cukunity/cli/argument_parser.rb', line 8 def cucumber_args @cucumber_args end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/cukunity/cli/argument_parser.rb', line 9 def @options end |
#remaining_args ⇒ Object (readonly)
Returns the value of attribute remaining_args.
7 8 9 |
# File 'lib/cukunity/cli/argument_parser.rb', line 7 def remaining_args @remaining_args end |
Class Method Details
.parse(args) ⇒ Object
12 13 14 15 |
# File 'lib/cukunity/cli/argument_parser.rb', line 12 def self.parse(args) parser = new(args) parser.parse end |
Instance Method Details
#parse ⇒ Object
21 22 23 24 |
# File 'lib/cukunity/cli/argument_parser.rb', line 21 def parse parse_command end |