Sha256: 1f09f98ef02a2246d9be9f5fc5841d8fcd78953d0de508d0f977810ad386efac
Contents?: true
Size: 790 Bytes
Versions: 25
Compression:
Stored size: 790 Bytes
Contents
# Only allow this backend if ActiveSupport::JSON is already loaded raise LoadError, "ActiveSupport::JSON isn't available. require 'activesupport/json'" unless defined?(ActiveSupport::JSON) module OEmbed module Formatter module JSON module Backends module ActiveSupportJSON extend self # Parses a JSON string or IO and convert it into an object. def decode(json) ::ActiveSupport::JSON.decode(json) end def decode_fail_msg "The version of ActiveSupport::JSON you have installed isn't parsing JSON like ruby-oembed expected." end def parse_error ::ActiveSupport::JSON.parse_error end end end end end end
Version data entries
25 entries across 25 versions & 2 rubygems