Class: CLI::Kit::Args::Tokenizer::Token
- Inherits:
-
Object
- Object
- CLI::Kit::Args::Tokenizer::Token
- Extended by:
- T::Sig
- Defined in:
- lib/cli/kit/args/tokenizer.rb
Constant Summary collapse
- OptionName =
Class.new(Token)
- LongOptionName =
Class.new(OptionName)
- ShortOptionName =
Class.new(OptionName)
- OptionValue =
Class.new(Token)
- PositionalArgument =
Class.new(Token)
- OptionValueOrPositionalArgument =
Class.new(Token)
- UnparsedArgument =
Class.new(Token)
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(value) ⇒ Token
constructor
A new instance of Token.
- #inspect ⇒ Object
Methods included from T::Sig
Constructor Details
#initialize(value) ⇒ Token
Returns a new instance of Token.
36 37 38 |
# File 'lib/cli/kit/args/tokenizer.rb', line 36 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
33 34 35 |
# File 'lib/cli/kit/args/tokenizer.rb', line 33 def value @value end |
Instance Method Details
#==(other) ⇒ Object
46 47 48 |
# File 'lib/cli/kit/args/tokenizer.rb', line 46 def ==(other) self.class == other.class && @value == other.value end |
#inspect ⇒ Object
41 42 43 |
# File 'lib/cli/kit/args/tokenizer.rb', line 41 def inspect "#<#{self.class.name} #{@value}>" end |