Class: Melbourne::AST::Range

Inherits:
Node
  • Object
show all
Defined in:
lib/melbourne/ast/literals.rb

Overview

A range literal as in:

1..3

Direct Known Subclasses

RangeExclude

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, start, finish) ⇒ Range

Returns a new instance of Range.



143
144
145
146
147
# File 'lib/melbourne/ast/literals.rb', line 143

def initialize(line, start, finish)
  @line = line
  @start = start
  @finish = finish
end

Instance Attribute Details

#finishObject

The finish of the range



141
142
143
# File 'lib/melbourne/ast/literals.rb', line 141

def finish
  @finish
end

#startObject

The start of the range



137
138
139
# File 'lib/melbourne/ast/literals.rb', line 137

def start
  @start
end