Class: Oyster::ArrayOption
Instance Attribute Summary
Attributes inherited from Option
#description
Instance Method Summary
collapse
Methods inherited from Option
#alternate, create, #has_name?, #initialize, #name
Constructor Details
This class inherits a constructor from Oyster::Option
Instance Method Details
#consume(list) ⇒ Object
4
5
6
7
8
|
# File 'lib/oyster/options/array.rb', line 4
def consume(list)
data = []
data << list.shift while list.first and !Oyster.is_name?(list.first)
data
end
|
#default_value ⇒ Object
10
11
12
|
# File 'lib/oyster/options/array.rb', line 10
def default_value
super([])
end
|
#help_names ⇒ Object
14
15
16
|
# File 'lib/oyster/options/array.rb', line 14
def help_names
super.map { |name| name + ' ARG1 [ARG2 [...]]' }
end
|