Class: Cliqr::Parser::SingleValuedOptionToken Private
- Inherits:
-
OptionToken
- Object
- Token
- OptionToken
- Cliqr::Parser::SingleValuedOptionToken
- Defined in:
- lib/cliqr/parser/single_valued_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 option and its value
Instance Attribute Summary
Attributes inherited from OptionToken
Attributes inherited from Token
Instance Method Summary collapse
-
#append(arg) ⇒ Cliqr::Parser::SingleValuedOptionToken
private
Append the next argument in the series and set token to inactive.
-
#initialize(name, arg) ⇒ SingleValuedOptionToken
constructor
private
Create a new option token.
Methods inherited from OptionToken
Methods inherited from Token
Constructor Details
#initialize(name, arg) ⇒ SingleValuedOptionToken
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. Initial state will be active
12 13 14 15 |
# File 'lib/cliqr/parser/single_valued_option_token.rb', line 12 def initialize(name, arg) super(name, arg) activate end |
Instance Method Details
#append(arg) ⇒ Cliqr::Parser::SingleValuedOptionToken
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.
Append the next argument in the series and set token to inactive
22 23 24 25 26 |
# File 'lib/cliqr/parser/single_valued_option_token.rb', line 22 def append(arg) @value = arg deactivate self end |