Ruby Subnet Calculator