Class: Refract::ArrayPatternNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/array_pattern_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#constantObject

Returns the value of attribute constant.



14
15
16
# File 'lib/refract/nodes/array_pattern_node.rb', line 14

def constant
  @constant
end

#postsObject

Returns the value of attribute posts.



14
15
16
# File 'lib/refract/nodes/array_pattern_node.rb', line 14

def posts
  @posts
end

#requiredsObject

Returns the value of attribute requireds.



14
15
16
# File 'lib/refract/nodes/array_pattern_node.rb', line 14

def requireds
  @requireds
end

#restObject

Returns the value of attribute rest.



14
15
16
# File 'lib/refract/nodes/array_pattern_node.rb', line 14

def rest
  @rest
end