In Files

Parent

Included Modules

PLRuby::NetAddr

The class PLRuby::NetAddr implement the PostgreSQL type inet and cidr

Public Class Methods

from_string(string, cidr = false) click to toggle source

Convert a String to a NetAddr

# File plruby.rb, line 1152
def from_string(string, cidr = false)
end
new(string, cidr = false) click to toggle source

create a NetAddr from a String

# File plruby.rb, line 1204
def initialize(string, cidr = false)
end

Public Instance Methods

<=>(other) click to toggle source

comparison function for 2 NetAddr objects

comparison is first on the common bits of the network part, then on the length of the network part, and then on the whole unmasked address.

# File plruby.rb, line 1160
def <=>(other)
end
abbrev() click to toggle source

return the abbreviated display format as a String object

# File plruby.rb, line 1164
def abbrev
end
broadcast() click to toggle source

return the broadcast address from the network

# File plruby.rb, line 1168
def broadcast
end
contain?(other) click to toggle source

return true if other is included in self

# File plruby.rb, line 1172
def contain?(other)
end
contain_or_equal?(other) click to toggle source

return true if other is included in self, or equal

# File plruby.rb, line 1176
def contain_or_equal?(other)
end
contained?(other) click to toggle source

return true if self is included in other

# File plruby.rb, line 1180
def contained?(other)
end
contained_or_equal?(other) click to toggle source

return true if self is included in other, or equal

# File plruby.rb, line 1184
def contained_or_equal?(other)
end
family() click to toggle source

return the String "AF_INET" or "AF_INET6"

# File plruby.rb, line 1188
def family
end
first() click to toggle source

return the first address in the network

# File plruby.rb, line 1192
def first
end
host() click to toggle source

extract the IP address and return it as a String

# File plruby.rb, line 1196
def host
end
hostmask() click to toggle source

return the host mask for network

# File plruby.rb, line 1200
def hostmask
end
last() click to toggle source

return the last address in the network

# File plruby.rb, line 1208
def last
end
masklen() click to toggle source

return the length of the netmask

# File plruby.rb, line 1212
def masklen
end
netmask() click to toggle source

return the netmask for the network

# File plruby.rb, line 1216
def netmask
end
network() click to toggle source

return the network part of the address

# File plruby.rb, line 1220
def network
end
set_masklen(len) click to toggle source

return a new NetAddr with netmask length len

# File plruby.rb, line 1224
def set_masklen(len)
end
to_s() click to toggle source

return the string representation of the address

# File plruby.rb, line 1228
def to_s
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.