Class: Refract::RangeNode

Inherits:
Node
  • Object
show all
Defined in:
lib/refract/nodes/range_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, left:, right:, exclude_end:) ⇒ RangeNode

Returns a new instance of RangeNode.



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

def initialize(prism_node: nil, left:, right:, exclude_end:)
  @prism_node = prism_node => Prism::Node | nil
  @left = left
  @right = right
  @exclude_end = exclude_end
  freeze
end

Instance Attribute Details

#exclude_endObject

Returns the value of attribute exclude_end.



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

def exclude_end
  @exclude_end
end

#leftObject

Returns the value of attribute left.



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

def left
  @left
end

#rightObject

Returns the value of attribute right.



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

def right
  @right
end