Class: Kumi::Core::NAST::Pair
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(key:, value:, **k) ⇒ Pair
constructor
A new instance of Pair.
Constructor Details
#initialize(key:, value:, **k) ⇒ Pair
Returns a new instance of Pair.
136 137 138 139 140 |
# File 'lib/kumi/core/nast.rb', line 136 def initialize(key:, value:, **k) super(**k) @key = key @value = value end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
134 135 136 |
# File 'lib/kumi/core/nast.rb', line 134 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
134 135 136 |
# File 'lib/kumi/core/nast.rb', line 134 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
142 143 144 |
# File 'lib/kumi/core/nast.rb', line 142 def accept(visitor) visitor.visit_pair(self) end |