Method: Subnets::Net4#to_s

Defined in:
ext/subnets/ext.c

#to_sString

Return a String in CIDR notation.

Returns:

  • (String)


559
560
561
562
563
564
565
566
567
# File 'ext/subnets/ext.c', line 559

VALUE
method_net4_to_s(VALUE self) {
  net4_t *net;
  char buf[32];

  Data_Get_Struct(self, net4_t, net);
  net4_snprint(*net, buf, 32);
  return rb_str_new2(buf);
}