Class: SNMP::Integer32

Inherits:
Integer show all
Defined in:
lib/snmp/varbind.rb

Instance Method Summary collapse

Methods inherited from Integer

#<=>, #asn1_type, #coerce, decode, #encode, #to_f, #to_i, #to_oid, #to_s

Constructor Details

#initialize(value) ⇒ Integer32

Returns a new instance of Integer32.

Raises:

  • (ArgumentError)


110
111
112
113
114
# File 'lib/snmp/varbind.rb', line 110

def initialize(value)
    super(value)
    raise ArgumentError, "Out of range: #{value}" if value < -2147483648
    raise ArgumentError, "Out of range: #{value}" if value > 2147483647
end