Class: Refract::HashPatternNode
- Defined in:
- lib/refract/nodes/hash_pattern_node.rb
Instance Attribute Summary collapse
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#rest ⇒ Object
Returns the value of attribute rest.
Instance Method Summary collapse
-
#initialize(prism_node: nil, elements:, rest:) ⇒ HashPatternNode
constructor
A new instance of HashPatternNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, elements:, rest:) ⇒ HashPatternNode
Returns a new instance of HashPatternNode.
5 6 7 8 9 10 |
# File 'lib/refract/nodes/hash_pattern_node.rb', line 5 def initialize(prism_node: nil, elements:, rest:) @prism_node = prism_node => Prism::Node | nil @elements = elements @rest = rest freeze end |
Instance Attribute Details
#elements ⇒ Object
Returns the value of attribute elements.
12 13 14 |
# File 'lib/refract/nodes/hash_pattern_node.rb', line 12 def elements @elements end |
#rest ⇒ Object
Returns the value of attribute rest.
12 13 14 |
# File 'lib/refract/nodes/hash_pattern_node.rb', line 12 def rest @rest end |