Class: CLI::Kit::Args::Parser::Node::Argument

Inherits:
CLI::Kit::Args::Parser::Node show all
Defined in:
lib/cli/kit/args/parser/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from T::Sig

#sig

Constructor Details

#initialize(value) ⇒ Argument

Returns a new instance of Argument.



92
93
94
95
# File 'lib/cli/kit/args/parser/node.rb', line 92

def initialize(value)
  @value = value
  super()
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



89
90
91
# File 'lib/cli/kit/args/parser/node.rb', line 89

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



103
104
105
# File 'lib/cli/kit/args/parser/node.rb', line 103

def ==(other)
  !!(super(other) && @value == other.value)
end

#inspectObject



98
99
100
# File 'lib/cli/kit/args/parser/node.rb', line 98

def inspect
  "#<#{self.class.name} #{@value}>"
end