Class: Kumi::Core::NAST::Hash
Instance Attribute Summary collapse
-
#pairs ⇒ Object
readonly
Returns the value of attribute pairs.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #children ⇒ Object
-
#initialize(pairs:, **k) ⇒ Hash
constructor
A new instance of Hash.
Methods inherited from Node
Constructor Details
#initialize(pairs:, **k) ⇒ Hash
Returns a new instance of Hash.
162 163 164 165 |
# File 'lib/kumi/core/nast.rb', line 162 def initialize(pairs:, **k) super(**k) @pairs = pairs end |
Instance Attribute Details
#pairs ⇒ Object (readonly)
Returns the value of attribute pairs.
160 161 162 |
# File 'lib/kumi/core/nast.rb', line 160 def pairs @pairs end |
Instance Method Details
#accept(visitor) ⇒ Object
167 168 169 |
# File 'lib/kumi/core/nast.rb', line 167 def accept(visitor) visitor.visit_hash(self) end |
#children ⇒ Object
171 |
# File 'lib/kumi/core/nast.rb', line 171 def children = pairs |