lib/submodules/ably-ruby/lib/ably/realtime/client.rb in ably-rest-0.7.5 vs lib/submodules/ably-ruby/lib/ably/realtime/client.rb in ably-rest-0.8.1

- old
+ new

@@ -62,25 +62,21 @@ # @option options [Boolean] :queue_messages If false, this disables the default behaviour whereby the library queues messages on a connection in the disconnected or connecting states # @option options [Boolean] :echo_messages If false, prevents messages originating from this connection being echoed back on the same connection # @option options [String] :recover When a recover option is specified a connection inherits the state of a previous connection that may have existed under a different instance of the Realtime library, please refer to the API documentation for further information on connection state recovery # @option options [Boolean] :connect_automatically By default as soon as the client library is instantiated it will connect to Ably. You can optionally set this to false and explicitly connect. # - # @yield (see Ably::Rest::Client#initialize) - # @yieldparam (see Ably::Rest::Client#initialize) - # @yieldreturn (see Ably::Rest::Client#initialize) - # # @return [Ably::Realtime::Client] # # @example # # create a new client authenticating with basic auth # client = Ably::Realtime::Client.new('key.id:secret') # # # create a new client and configure a client ID used for presence - # client = Ably::Realtime::Client.new(api_key: 'key.id:secret', client_id: 'john') + # client = Ably::Realtime::Client.new(key: 'key.id:secret', client_id: 'john') # - def initialize(options, &token_request_block) - @rest_client = Ably::Rest::Client.new(options, &token_request_block) + def initialize(options) + @rest_client = Ably::Rest::Client.new(options) @auth = @rest_client.auth @channels = Ably::Realtime::Channels.new(self) @echo_messages = @rest_client.options.fetch(:echo_messages, true) == false ? false : true @custom_realtime_host = @rest_client.options[:realtime_host] || @rest_client.options[:ws_host] @connect_automatically = @rest_client.options.fetch(:connect_automatically, true) == false ? false : true @@ -112,10 +108,10 @@ # Retrieve the stats for the application # # @param (see Ably::Rest::Client#stats) # @option options (see Ably::Rest::Client#stats) # - # @yield [Ably::Models::PaginatedResource<Ably::Models::Stat>] An Array of Stats + # @yield [Ably::Models::PaginatedResource<Ably::Models::Stats>] An Array of Stats # # @return [Ably::Util::SafeDeferrable] # def stats(options = {}, &success_callback) async_wrap(success_callback) do