Skip to content

Add a method to convert from IPAddr to IP #19

@madis

Description

@madis

I find the ruby-ip functionality much better than the standard library's IPAddr but for example Rails converts ip adddresses automatically to IPAddr. It would be very useful if this gem had a way to convert from IPAddr to IP.

E.g. something like

a = IP.from_ipaddr(IPAddr.new('192.168.0.1/22'))
# or
b = IP.new(IPAddr.new('192.168.0.1/22'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions