method

as_json

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

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.