Sha256: 80c658bf0e8e3cf18a7a522284edc4ff67bcb9eec2f719ad3ae47c67bb42d19b

Contents?: true

Size: 418 Bytes

Versions: 69

Compression:

Stored size: 418 Bytes

Contents

require 'msgpack'

module Ably::Modules
  # MessagePack module adds #to_msgpack to the class on the assumption that the class
  # supports the method #as_json
  #
  module MessagePack
    # Generate a packed MsgPack version of this object based on the JSON representation.
    # Keys thus use mixedCase syntax as expected by the Realtime API
    def to_msgpack(pk = nil)
      as_json.to_msgpack(pk)
    end
  end
end

Version data entries

69 entries across 69 versions & 2 rubygems

Version Path
ably-rest-1.2.7 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.2.7 lib/ably/modules/message_pack.rb
ably-rest-1.2.6 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.2.6 lib/ably/modules/message_pack.rb
ably-rest-1.2.4 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.2.4 lib/ably/modules/message_pack.rb
ably-rest-1.2.3 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.2.3 lib/ably/modules/message_pack.rb
ably-rest-1.2.2 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.2.2 lib/ably/modules/message_pack.rb
ably-rest-1.2.1 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.2.1 lib/ably/modules/message_pack.rb
ably-rest-1.2.0 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.2.0 lib/ably/modules/message_pack.rb
ably-rest-1.1.8 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.1.8 lib/ably/modules/message_pack.rb
ably-rest-1.1.7 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.1.7 lib/ably/modules/message_pack.rb
ably-rest-1.1.6 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-1.1.6 lib/ably/modules/message_pack.rb