Module: ActiveModel::Serializers::Msgpack

Included in:
ActiveRecord::Serialization
Defined in:
lib/msgpack_rails/3/msgpack_serializer.rb

Instance Method Summary collapse

Instance Method Details

#to_msgpack(options = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/msgpack_rails/3/msgpack_serializer.rb', line 4

def to_msgpack(options = {})
  options = {:out => options} if options.is_a?(String)
  options[:out] ||= ''

  options[:out] << serializable_hash(options).to_msgpack
end