class Fuelcell::Parser::IgnoreHandler
Removes any args after the string ‘–’ is found in the raw_args. It also removes the ignore string itself from the raw args.
@param raw_args [Array] list of args usually from ARGV @return [Array]
Public Instance Methods
call(raw_args)
click to toggle source
# File lib/fuelcell/parser/ignore_handler.rb, line 9 def call(raw_args) unless raw_args.is_a?(Array) fail ArgumentError, 'raw args must be an array' end ignores = [] index = raw_args.index('--') return ignores unless index ignores = raw_args.slice!(index, raw_args.size) # remove the ignore symbol -- ignores.shift ignores end