I've been using the ip-address gem and it doesn't seem to have the ability to convert from a netmask of the form
255.255.255.0
into the CIDR form
/24
Does anyone have an ideas how to quickly convert the former to the latter ?
I've been using the ip-address gem and it doesn't seem to have the ability to convert from a netmask of the form
255.255.255.0
into the CIDR form
/24
Does anyone have an ideas how to quickly convert the former to the latter ?
Here is a way to do it without the IPAddr gem