Class: Bignum

Inherits:
Object show all
Defined in:
lib/has_ip_address/extensions.rb

Instance Method Summary collapse

Instance Method Details

#to_ipaddrObject



19
20
21
# File 'lib/has_ip_address/extensions.rb', line 19

def to_ipaddr
 [24, 16, 8, 0].collect {|b| (self >> b) & 255}.join('.').to_ipaddr
end