class IpAddress
Public Class Methods
from_dotted(str)
click to toggle source
# File lib/gorillib/model/type/ip_address.rb, line 63 def self.from_dotted(str) new(str) end
Public Instance Methods
dotted()
click to toggle source
# File lib/gorillib/model/type/ip_address.rb, line 38 def dotted self end
packed()
click to toggle source
@return [Integer] the 32-bit integer for this IP address
# File lib/gorillib/model/type/ip_address.rb, line 47 def packed ip_a, ip_b, ip_c, ip_d = quads ((ip_a << 24) + (ip_b << 16) + (ip_c << 8) + (ip_d)) end
quads()
click to toggle source
# File lib/gorillib/model/type/ip_address.rb, line 52 def quads self.split(".", 4).map{|qq| Integer(qq) } end
to_i()
click to toggle source
# File lib/gorillib/model/type/ip_address.rb, line 42 def to_i packed end