Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Apr 10, 2024

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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants