5
# Represents an array of arguments. It is an array that strips separator
6
# arguments (`--`) but provides a `#raw` method to get the raw arguments
7
# array, i.e. an array that includes the separator `--` arguments.
8
class ArgumentArray < Array
10
# Initializes the array using the given raw arguments.
12
# @param [Array<String>] raw_arguments A list of raw arguments, i.e.
13
# including any separator arguments (`--`).
14
def initialize(raw_arguments)
15
super(raw_arguments.reject { |a| '--' == a })
16
@raw_arguments = raw_arguments
19
# @return [Array<String>] The arguments, including any separator arguments