method
install
v8.0.0 -
Show latest stable
- Class:
ActiveSupport::MessagePack::Extensions
install(registry)public
No documentation available.
# File activesupport/lib/active_support/message_pack/extensions.rb, line 20
def install(registry)
registry.register_type 0, Symbol,
packer: :to_msgpack_ext,
unpacker: :from_msgpack_ext,
optimized_symbols_parsing: true
registry.register_type 1, Integer,
packer: ::MessagePack::Bigint.method(:to_msgpack_ext),
unpacker: ::MessagePack::Bigint.method(:from_msgpack_ext),
oversized_integer_extension: true
registry.register_type 2, BigDecimal,
packer: :_dump,
unpacker: :_load
registry.register_type 3, Rational,
packer: method(:write_rational),
unpacker: method(:read_rational),
recursive: true
registry.register_type 4, Complex,
packer: method(:write_complex),
unpacker: method(:read_complex),
recursive: true
registry.register_type 5, DateTime,
packer: method(:write_datetime),
unpacker: method(:read_datetime),
recursive: true
registry.register_type 6, Date,
packer: method(:write_date),
unpacker: method(:read_date),
recursive: true
registry.register_type 7, Time,
packer: method(:write_time),
unpacker: method(:read_time),
recursive: true
registry.register_type 8, ActiveSupport::TimeWithZone,
packer: method(:write_time_with_zone),
unpacker: method(:read_time_with_zone),
recursive: true
registry.register_type 9, ActiveSupport::TimeZone,
packer: method(:dump_time_zone),
unpacker: method(:load_time_zone)
registry.register_type 10, ActiveSupport::Duration,
packer: method(:write_duration),
unpacker: method(:read_duration),
recursive: true
registry.register_type 11, Range,
packer: method(:write_range),
unpacker: method(:read_range),
recursive: true
registry.register_type 12, Set,
packer: method(:write_set),
unpacker: method(:read_set),
recursive: true
registry.register_type 13, URI::Generic,
packer: :to_s,
unpacker: URI.method(:parse)
registry.register_type 14, IPAddr,
packer: method(:write_ipaddr),
unpacker: method(:read_ipaddr),
recursive: true
registry.register_type 15, Pathname,
packer: :to_s,
unpacker: :new
registry.register_type 16, Regexp,
packer: :to_s,
unpacker: :new
registry.register_type 17, ActiveSupport::HashWithIndifferentAccess,
packer: method(:write_hash_with_indifferent_access),
unpacker: method(:read_hash_with_indifferent_access),
recursive: true
end