Class: PVN::BooleanOption
- Inherits:
-
Option
- Object
- BaseOption
- Option
- PVN::BooleanOption
- Defined in:
- lib/synoption/boolean_option.rb
Overview
a boolean option maps to a single tag, not a tag and value. For example, ā-vā (verbose) is a boolean option, but ā-r 3444ā (revision) is a option with a value.
Direct Known Subclasses
Command::ColorOption, Command::HelpOption, Diff::WhitespaceOption, Log::VerboseOption
Constant Summary
Constants inherited from BaseOption
PVN::BaseOption::NO_CMDLINE_OPTION
Instance Attribute Summary
Attributes inherited from BaseOption
#default, #description, #name, #negate, #regexp, #tag
Instance Method Summary collapse
Methods inherited from BaseOption
#exact_match?, #initialize, #negative_match?, #next_argument, #post_process, #process, #regexp_match?, #resolve_value, #set_value, #to_doc, #to_s, #unset, #value
Constructor Details
This class inherits a constructor from PVN::BaseOption
Instance Method Details
#takes_value? ⇒ Boolean
13 14 15 |
# File 'lib/synoption/boolean_option.rb', line 13 def takes_value? false end |
#to_command_line ⇒ Object
17 18 19 |
# File 'lib/synoption/boolean_option.rb', line 17 def to_command_line super && [ tag ] end |