lib/submodules/ably-ruby/lib/ably/models/message.rb in ably-rest-0.9.1 vs lib/submodules/ably-ruby/lib/ably/models/message.rb in ably-rest-0.9.2

- old
+ new

@@ -1,5 +1,7 @@ +require 'ably/models/message_encoders/base' + module Ably::Models # Convert messsage argument to a {Message} object and associate with a protocol message if provided # # @param message [Message,Hash] A message object or Hash of message properties # @param [Hash] options (see Message#initialize) @@ -40,9 +42,12 @@ class Message include Ably::Modules::Conversions include Ably::Modules::Encodeable include Ably::Modules::ModelCommon include Ably::Modules::SafeDeferrable if defined?(Ably::Realtime) + + # Statically register a default set of encoders for this class + Ably::Models::MessageEncoders.register_default_encoders self # {Message} initializer # # @param attributes [Hash] object with the underlying message detail key value attributes # @param [Hash] options an options Hash for this initializer