Class: P4Tools::CommandParser

Inherits:
Object
  • Object
show all
Defined in:
lib/p4tools/parsers/command_parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ CommandParser

Returns a new instance of CommandParser.

Parameters:

  • args (Array<String>)


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

#parseArray<CommandEntry>

Returns:



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