Class: Cliqr::Parser::BooleanOptionToken Private
- Inherits:
-
OptionToken
- Object
- Token
- OptionToken
- Cliqr::Parser::BooleanOptionToken
- Defined in:
- lib/cliqr/parser/boolean_option_token.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Token handler for parsing a boolean option
Instance Attribute Summary
Attributes inherited from OptionToken
Attributes inherited from Token
Instance Method Summary collapse
-
#initialize(name, arg) ⇒ BooleanOptionToken
constructor
private
Create a new option token to store boolean value.
Methods inherited from OptionToken
Methods inherited from Token
Constructor Details
#initialize(name, arg) ⇒ BooleanOptionToken
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a new option token to store boolean value
10 11 12 13 |
# File 'lib/cliqr/parser/boolean_option_token.rb', line 10 def initialize(name, arg) super(name, arg) @value = !arg.to_s.start_with?('--no-') end |