Exception: BitInt::OverflowError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/bitint/overflow_error.rb

Overview

Indicates that BitInt::Base.create was called with an integer that was too large.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(integer, range) ⇒ OverflowError

Returns a new instance of OverflowError.



9
10
11
12
13
# File 'lib/bitint/overflow_error.rb', line 9

def initialize(integer, range)
  super "#{integer} is out of bounds (range=#{range})"
  @integer = integer
  @range = range
end

Instance Attribute Details

#integerObject (readonly)

Returns the value of attribute integer.



7
8
9
# File 'lib/bitint/overflow_error.rb', line 7

def integer
  @integer
end

#rangeObject (readonly)

Returns the value of attribute range.



7
8
9
# File 'lib/bitint/overflow_error.rb', line 7

def range
  @range
end