method

as_json

v8.1.1 - Show latest stable - Class: IPAddr
as_json(options = nil)
public

No documentation available.

# File activesupport/lib/active_support/core_ext/object/json.rb, line 245
    def as_json(options = nil)
      if ipv4? && prefix == 32
        to_s
      elsif ipv6? && prefix == 128
        to_s
      else
        "#{self}/#{prefix}"
      end
    end