diff --git a/lib/ably/realtime/channel.rb b/lib/ably/realtime/channel.rb index 5f6cba49..65b0ddfc 100644 --- a/lib/ably/realtime/channel.rb +++ b/lib/ably/realtime/channel.rb @@ -42,7 +42,7 @@ class Channel # # @spec RTL2b # - # The permited states for this channel + # The permitted states for this channel STATE = ruby_enum('STATE', :initialized, :attaching, diff --git a/lib/ably/realtime/client.rb b/lib/ably/realtime/client.rb index bf04776c..e603f766 100644 --- a/lib/ably/realtime/client.rb +++ b/lib/ably/realtime/client.rb @@ -120,10 +120,10 @@ def initialize(options) acc[key.to_s] = value.to_s end @rest_client = Ably::Rest::Client.new(options.merge(realtime_client: self)) - @echo_messages = rest_client.options.fetch(:echo_messages, true) == false ? false : true - @queue_messages = rest_client.options.fetch(:queue_messages, true) == false ? false : true + @echo_messages = rest_client.options.fetch(:echo_messages, true) + @queue_messages = rest_client.options.fetch(:queue_messages, true) @custom_realtime_host = rest_client.options[:realtime_host] || rest_client.options[:ws_host] - @auto_connect = rest_client.options.fetch(:auto_connect, true) == false ? false : true + @auto_connect = rest_client.options.fetch(:auto_connect, true) @recover = rest_client.options[:recover] raise ArgumentError, "Recovery key '#{recover}' is invalid" if recover && !recover.match(Connection::RECOVER_REGEX) @@ -131,6 +131,8 @@ def initialize(options) @auth = Ably::Realtime::Auth.new(self) @channels = Ably::Realtime::Channels.new(self) @connection = Ably::Realtime::Connection.new(self, options) + + end # Return a {Ably::Realtime::Channel Realtime Channel} for the given name