Class: Refract::MatchWriteNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/match_write_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, call:, targets:) ⇒ MatchWriteNode

Returns a new instance of MatchWriteNode.



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

def initialize(prism_node: nil, call:, targets:)
  @prism_node = prism_node => Prism::Node | nil
  @call = call
  @targets = targets
  freeze
end

Instance Attribute Details

#callObject

Returns the value of attribute call.



12
13
14
# File 'lib/refract/nodes/match_write_node.rb', line 12

def call
  @call
end

#targetsObject

Returns the value of attribute targets.



12
13
14
# File 'lib/refract/nodes/match_write_node.rb', line 12

def targets
  @targets
end