Sha256: 9ff713d8e160c73a0d1c87f716d5c8ed6dd54da02e61d10f957dfee89be4bcff

Contents?: true

Size: 418 Bytes

Versions: 16

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(*args)
      as_json(*args).to_msgpack
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
ably-rest-0.8.2 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-0.8.2 lib/ably/modules/message_pack.rb
ably-0.8.1 lib/ably/modules/message_pack.rb
ably-rest-0.8.1 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-0.8.0 lib/ably/modules/message_pack.rb
ably-0.7.6 lib/ably/modules/message_pack.rb
ably-rest-0.7.5 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-0.7.5 lib/ably/modules/message_pack.rb
ably-0.7.4 lib/ably/modules/message_pack.rb
ably-rest-0.7.3 lib/submodules/ably-ruby/lib/ably/modules/message_pack.rb
ably-0.7.2 lib/ably/modules/message_pack.rb
ably-0.7.1 lib/ably/modules/message_pack.rb
ably-0.7.0 lib/ably/modules/message_pack.rb
ably-0.6.2 lib/ably/modules/message_pack.rb
ably-0.2.0 lib/ably/modules/message_pack.rb
ably-0.1.6 lib/ably/modules/message_pack.rb