Class: Synoption::BooleanOption

Inherits:
Ragol::Option show all
Includes:
OptionInit
Defined in:
lib/ragol/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.

Instance Attribute Summary

Attributes inherited from Ragol::Option

#default, #description, #matchers, #name, #negates, #regexps, #tags

Instance Method Summary collapse

Methods included from OptionInit

#initialize

Methods inherited from Ragol::Option

#argument_missing, #convert, #do_match, #initialize, #match_next_value, #match_next_value_optional, #match_next_value_required, #match_rc?, #post_process, #resolve_value, #set_option_value, #set_value_for_tag, #set_value_negative, #set_value_regexp, #take_eq_value, #to_doc, #to_matcher, #to_s, #value_regexp

Instance Method Details

#default_valueObject



14
15
16
# File 'lib/ragol/synoption/boolean_option.rb', line 14

def default_value
  false
end

#takes_value?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/ragol/synoption/boolean_option.rb', line 18

def takes_value?
  false
end