Class: CLI::Kit::Args::Parser::Node::Option
- Inherits:
-
CLI::Kit::Args::Parser::Node
- Object
- CLI::Kit::Args::Parser::Node
- CLI::Kit::Args::Parser::Node::Option
- Extended by:
- T::Sig
- Defined in:
- lib/cli/kit/args/parser/node.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, value) ⇒ Option
constructor
A new instance of Option.
- #inspect ⇒ Object
Methods included from T::Sig
Constructor Details
#initialize(name, value) ⇒ Option
Returns a new instance of Option.
31 32 33 34 35 |
# File 'lib/cli/kit/args/parser/node.rb', line 31 def initialize(name, value) @name = name @value = value super() end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
25 26 27 |
# File 'lib/cli/kit/args/parser/node.rb', line 25 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
28 29 30 |
# File 'lib/cli/kit/args/parser/node.rb', line 28 def value @value end |
Instance Method Details
#==(other) ⇒ Object
44 45 46 |
# File 'lib/cli/kit/args/parser/node.rb', line 44 def ==(other) !!(super(other) && @value == other.value && @name == other.name) end |
#inspect ⇒ Object
39 40 41 |
# File 'lib/cli/kit/args/parser/node.rb', line 39 def inspect "#<#{self.class.name} #{@name}=#{@value}>" end |