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
- Defined in:
- lib/cli/kit/args/parser/node.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
: String.
-
#value ⇒ Object
readonly
: String.
Instance Method Summary collapse
-
#==(other) ⇒ Object
: (untyped other) -> bool.
-
#initialize(name, value) ⇒ Option
constructor
: (String name, String value) -> void.
-
#inspect ⇒ Object
: -> String.
Constructor Details
#initialize(name, value) ⇒ Option
: (String name, String value) -> void
27 28 29 30 31 |
# File 'lib/cli/kit/args/parser/node.rb', line 27 def initialize(name, value) @name = name @value = value super() end |
Instance Attribute Details
#name ⇒ Object (readonly)
: String
21 22 23 |
# File 'lib/cli/kit/args/parser/node.rb', line 21 def name @name end |
#value ⇒ Object (readonly)
: String
24 25 26 |
# File 'lib/cli/kit/args/parser/node.rb', line 24 def value @value end |
Instance Method Details
#==(other) ⇒ Object
: (untyped other) -> bool
40 41 42 |
# File 'lib/cli/kit/args/parser/node.rb', line 40 def ==(other) !!(super(other) && @value == other.value && @name == other.name) end |
#inspect ⇒ Object
: -> String
35 36 37 |
# File 'lib/cli/kit/args/parser/node.rb', line 35 def inspect "#<#{self.class.name} #{@name}=#{@value}>" end |