Skip to content

Comments

Add IPAddr.cidr to return ip address in cidr notation#23

Merged
sorah merged 1 commit intoruby:masterfrom
beanieboi:ip-addr-cidr-method
Apr 10, 2024
Merged

Add IPAddr.cidr to return ip address in cidr notation#23
sorah merged 1 commit intoruby:masterfrom
beanieboi:ip-addr-cidr-method

Conversation

@beanieboi
Copy link
Contributor

Hey,

the current to_s() or to_string() implementations are omitting the prefix. This adds a new method cidr() which returns a string representation in CIDR notation.

Thanks
ben

@taketo1113
Copy link
Contributor

+1

I use similar method of cidr to treat addresblocks for IPAM (IP Address Management) Tools.

@sorah sorah merged commit db1b5e3 into ruby:master Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants