class Fuelcell::Parser::CmdArgsStrategy
Public Instance Methods
call(args)
click to toggle source
Extract arguments that form the command to be executed.
This will collect all arguments up to the first option or the ignore symbol –. It separates and returns the command args as an array of strings that form a heirarchal route to the command. These command args are removed from the raw arg list
@param [Array] raw args from ARGV @return <Array>
# File lib/fuelcell/parser/cmd_args_strategy.rb, line 15 def call(args) cmd_args = [] while item = args.shift if item.start_with?('-') args.unshift(item) break end cmd_args << item end cmd_args end