Module: Ably

Defined in:
lib/ably/modules/ably.rb,
lib/ably/auth.rb,
lib/ably/rest.rb,
lib/ably/logger.rb,
lib/ably/version.rb,
lib/ably/realtime.rb,
lib/ably/rest/push.rb,
lib/ably/exceptions.rb,
lib/ably/rest/client.rb,
lib/ably/rest/channel.rb,
lib/ably/realtime/auth.rb,
lib/ably/realtime/push.rb,
lib/ably/rest/channels.rb,
lib/ably/rest/presence.rb,
lib/ably/realtime/client.rb,
lib/ably/realtime/channel.rb,
lib/ably/realtime/channels.rb,
lib/ably/realtime/connection.rb,
lib/ably/modules/event_emitter.rb,
lib/ably/rest/middleware/logger.rb,
lib/ably/modules/exception_codes.rb,
lib/ably/rest/middleware/encoder.rb,
lib/ably/rest/middleware/exceptions.rb,
lib/ably/rest/middleware/parse_json.rb,
lib/ably/models/message_encoders/base.rb,
lib/ably/rest/middleware/parse_message_pack.rb,
lib/ably/rest/middleware/external_exceptions.rb,
lib/ably/rest/middleware/fail_if_unsupported_mime_type.rb

Overview

MessageEncoders are registered with the Ably client library and are responsible for encoding & decoding messages.

For example, if a message body is detected as JSON, it is encoded as a String and the encoding attribute of the message is defined as 'json'. Encrypted messages are encoded & decoded by the Cipher encoder.

Defined Under Namespace

Modules: Exceptions, Models, Modules, Realtime, Rest, Util Classes: Auth, Logger

Constant Summary collapse

VERSION =
'1.1.1'
PROTOCOL_VERSION =
'1.1'
FALLBACK_HOSTS =

Fallback hosts to use when a connection to rest/realtime.ably.io is not possible due to network failures either at the client, between the client and Ably, within an Ably data center, or at the IO domain registrar

%w(A.ably-realtime.com B.ably-realtime.com C.ably-realtime.com D.ably-realtime.com E.ably-realtime.com).freeze
INTERNET_CHECK =
{
  url:     '//internet-up.ably-realtime.com/is-the-internet-up.txt',
  ok_text: 'yes'
}.freeze

Class Method Summary collapse

Class Method Details

.lib_variantObject



13
14
15
# File 'lib/ably/version.rb', line 13

def self.lib_variant
  @lib_variant
end

.lib_variant=(variant) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
# File 'lib/ably/version.rb', line 9

def self.lib_variant=(variant)
  @lib_variant = variant
end

.major_minor_version_numericObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/ably/version.rb', line 18

def self.major_minor_version_numeric
  VERSION.gsub(/\.\d+$/, '').to_f
end