Class: Refract::MultiTargetNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/multi_target_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, lefts:, rest:, rights:) ⇒ MultiTargetNode

Returns a new instance of MultiTargetNode.



5
6
7
8
9
10
11
# File 'lib/refract/nodes/multi_target_node.rb', line 5

def initialize(prism_node: nil, lefts:, rest:, rights:)
  @prism_node = prism_node => Prism::Node | nil
  @lefts = lefts
  @rest = rest
  @rights = rights
  freeze
end

Instance Attribute Details

#leftsObject

Returns the value of attribute lefts.



13
14
15
# File 'lib/refract/nodes/multi_target_node.rb', line 13

def lefts
  @lefts
end

#restObject

Returns the value of attribute rest.



13
14
15
# File 'lib/refract/nodes/multi_target_node.rb', line 13

def rest
  @rest
end

#rightsObject

Returns the value of attribute rights.



13
14
15
# File 'lib/refract/nodes/multi_target_node.rb', line 13

def rights
  @rights
end