Method: Subnets::Net4.parse
- Defined in:
- ext/subnets/ext.c
.parse(s) ⇒ Net4
Parse s as an IPv4 network in CIDR notation.
142 143 144 145 146 147 148 149 150 151 |
# File 'ext/subnets/ext.c', line 142 VALUE method_net4_parse(VALUE class, VALUE s) { const char *buf = StringValueCStr(s); net4_t net; if (!read_net4_strict(buf, &net)) { raise_parse_error("net4", buf); } return net4_new(class, net); } |