How can you tell if an ip, say 62.156.244.13 is within the range of 62.0.0.0 and 62.255.255.255
62.156.244.13
62.0.0.0
62.255.255.255
jdl's answer is good. I would make the in_range? function a one-liner:
def ip_addr_in_range?(low, high, addr) (numeric_ip(low) .. numeric_ip(high)) === numeric_ip(addr) end