class Cri::ArgumentArray

Represents an array of arguments. It is an array that strips separator arguments (`–`) but provides a `#raw` method to get the raw arguments array, i.e. an array that includes the separator `–` arguments.

Public Class Methods

new(raw_arguments) click to toggle source

Initializes the array using the given raw arguments.

@param [Array<String>] raw_arguments A list of raw arguments, i.e.

including any separator arguments (`--`).
Calls superclass method
# File lib/cri/argument_array.rb, line 10
def initialize(raw_arguments)
  super(raw_arguments.reject { |a| '--' == a })
  @raw_arguments = raw_arguments
end

Public Instance Methods

raw() click to toggle source

@return [Array<String>] The arguments, including any separator arguments

(%x`--`)
# File lib/cri/argument_array.rb, line 17
def raw
  @raw_arguments
end