Exception: PositionRange::Error

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

Overview

–# Copyright: © 2006-2008 The LogiLogi Foundation <[email protected]>

License:

This file is part of the PositionRange Library. PositionRange is Free
Software. You can run/distribute/modify PositionRange under the terms of
the GNU Affero General Public License version 3. The Affero GPL states
that running a modified version or a derivative work also requires you to
make the sourcecode of that work available to everyone that can interact
with it. We chose the Affero GPL to ensure that PositionRange remains open
and libre (LICENSE.txt contains the full text of the legally binding
license).

++#

This Error is raised if positions are out of range.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_range, to_range) ⇒ Error

Returns a new instance of Error.



20
21
22
23
# File 'lib/position_range/error.rb', line 20

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.



18
19
20
# File 'lib/position_range/error.rb', line 18

def from_range
  @from_range
end

#to_rangeObject

Returns the value of attribute to_range.



18
19
20
# File 'lib/position_range/error.rb', line 18

def to_range
  @to_range
end

Instance Method Details

#messageObject



25
26
27
# File 'lib/position_range/error.rb', line 25

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