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)


123
124
125
126
127
# File 'lib/snmp/varbind.rb', line 123

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