Sha256: 327ba5521edce2f5ece3547c1c60a4863022dc721a0d55ad3e830e79fd4242f1
Contents?: true
Size: 695 Bytes
Versions: 1
Compression:
Stored size: 695 Bytes
Contents
require 'active_support/all' class FalseClass def to_builder 'false' end end class TrueClass def to_builder 'true' end end class String def to_builder "\"#{self}\"" end end class Hash def to_builder to_json end end class NilClass def to_builder 'null' end end module ActiveSupport class TimeWithZone def to_builder "\"#{iso8601}\"" end end end class Time def to_builder "\"#{iso8601}\"" end end class Date def to_builder "\"#{to_time.iso8601}\"" end end class DateTime def to_builder "\"#{to_time.iso8601}\"" end end module BSON class ObjectId def to_builder "\"#{self}\"" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json_builder-3.1.0 | lib/json_builder/extensions.rb |