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