Class: Refract::InNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/in_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, pattern:, statements:) ⇒ InNode

Returns a new instance of InNode.



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

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

Instance Attribute Details

#patternObject

Returns the value of attribute pattern.



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

def pattern
  @pattern
end

#statementsObject

Returns the value of attribute statements.



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

def statements
  @statements
end