Class: ValueRange
- Inherits:
-
Object
- Object
- ValueRange
- Defined in:
- lib/visitor/k_common_visitor.rb
Instance Attribute Summary collapse
-
#endOffset ⇒ Object
Returns the value of attribute endOffset.
-
#startOffset ⇒ Object
Returns the value of attribute startOffset.
Instance Method Summary collapse
-
#initialize(startOffset, endOffset) ⇒ ValueRange
constructor
A new instance of ValueRange.
- #length ⇒ Object
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
#endOffset ⇒ Object
Returns the value of attribute endOffset.
3 4 5 |
# File 'lib/visitor/k_common_visitor.rb', line 3 def endOffset @endOffset end |
#startOffset ⇒ Object
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
#length ⇒ Object
10 11 12 |
# File 'lib/visitor/k_common_visitor.rb', line 10 def length return @endOffset - @startOffset + 1 end |