Class: P4Tools::CommandParser
- Inherits:
-
Object
- Object
- P4Tools::CommandParser
- Defined in:
- lib/p4tools/parsers/command_parser.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ CommandParser
constructor
A new instance of CommandParser.
- #parse ⇒ Array<CommandEntry>
Constructor Details
#initialize(args) ⇒ CommandParser
Returns a new instance of CommandParser.
5 6 7 8 |
# File 'lib/p4tools/parsers/command_parser.rb', line 5 def initialize(args) @raw_args = args @parsed_args = [] end |
Instance Method Details
#parse ⇒ Array<CommandEntry>
11 12 13 14 15 16 |
# File 'lib/p4tools/parsers/command_parser.rb', line 11 def parse parse_global_arguments parse_commands @parsed_args end |