Class: Oyster::FlagOption
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
|
# File 'lib/oyster/options/flag.rb', line 4
def consume(list)
end
|
#default_value ⇒ Object
7
8
9
|
# File 'lib/oyster/options/flag.rb', line 7
def default_value
super(false)
end
|
#description ⇒ Object
17
18
19
|
# File 'lib/oyster/options/flag.rb', line 17
def description
super + (default_value ? ' (This is the default)' : '')
end
|
#help_names ⇒ Object
11
12
13
14
15
|
# File 'lib/oyster/options/flag.rb', line 11
def help_names
default_value ?
super.map { |name| name.sub(/^--/, '--[no-]') } :
super
end
|