Class: ValueRange

Inherits:
Object
  • Object
show all
Defined in:
lib/visitor/k_common_visitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(startOffset, endOffset) ⇒ ValueRange

Returns a new instance of ValueRange.



5
6
7
8
# File 'lib/visitor/k_common_visitor.rb', line 5

def initialize(startOffset, endOffset)
  @startOffset = startOffset
  @endOffset = endOffset
end

Instance Attribute Details

#endOffsetObject

Returns the value of attribute endOffset.



3
4
5
# File 'lib/visitor/k_common_visitor.rb', line 3

def endOffset
  @endOffset
end

#startOffsetObject

Returns the value of attribute startOffset.



3
4
5
# File 'lib/visitor/k_common_visitor.rb', line 3

def startOffset
  @startOffset
end

Instance Method Details

#lengthObject



10
11
12
# File 'lib/visitor/k_common_visitor.rb', line 10

def length
  return @endOffset - @startOffset + 1
end