Exception: PositionRange::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/position_range/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_range, to_range) ⇒ Error

Returns a new instance of Error.



4
5
6
7
# File 'lib/position_range/error.rb', line 4

def initialize(from_range, to_range)
  @from_range = from_range
  @to_range = to_range
end

Instance Attribute Details

#from_rangeObject

Returns the value of attribute from_range.



2
3
4
# File 'lib/position_range/error.rb', line 2

def from_range
  @from_range
end

#to_rangeObject

Returns the value of attribute to_range.



2
3
4
# File 'lib/position_range/error.rb', line 2

def to_range
  @to_range
end

Instance Method Details

#messageObject



9
10
11
# File 'lib/position_range/error.rb', line 9

def message
  super.to_s + ': ' + @from_range.to_s + ',' + @to_range.to_s
end