Module: Ably::Models
- Defined in:
- lib/ably-rest/modules/eventmachine_deferrable.rb,
lib/ably-rest/modules/eventmachine_deferrable.rb,
lib/submodules/ably-ruby/lib/ably/models/stats.rb,
lib/submodules/ably-ruby/lib/ably/models/message.rb,
lib/submodules/ably-ruby/lib/ably/models/error_info.rb,
lib/submodules/ably-ruby/lib/ably/models/nil_logger.rb,
lib/submodules/ably-ruby/lib/ably/models/stats_types.rb,
lib/submodules/ably-ruby/lib/ably/models/auth_details.rb,
lib/submodules/ably-ruby/lib/ably/models/delta_extras.rb,
lib/submodules/ably-ruby/lib/ably/models/cipher_params.rb,
lib/submodules/ably-ruby/lib/ably/models/token_details.rb,
lib/submodules/ably-ruby/lib/ably/models/token_request.rb,
lib/submodules/ably-ruby/lib/ably/models/device_details.rb,
lib/submodules/ably-ruby/lib/ably/models/channel_options.rb,
lib/submodules/ably-ruby/lib/ably/models/paginated_result.rb,
lib/submodules/ably-ruby/lib/ably/models/presence_message.rb,
lib/submodules/ably-ruby/lib/ably/models/protocol_message.rb,
lib/submodules/ably-ruby/lib/ably/models/connection_details.rb,
lib/submodules/ably-ruby/lib/ably/models/device_push_details.rb,
lib/submodules/ably-ruby/lib/ably/models/channel_state_change.rb,
lib/submodules/ably-ruby/lib/ably/models/message_encoders/base.rb,
lib/submodules/ably-ruby/lib/ably/models/idiomatic_ruby_wrapper.rb,
lib/submodules/ably-ruby/lib/ably/models/connection_state_change.rb,
lib/submodules/ably-ruby/lib/ably/models/http_paginated_response.rb,
lib/submodules/ably-ruby/lib/ably/models/push_channel_subscription.rb
Defined Under Namespace
Modules: MessageEncoders Classes: AuthDetails, ChannelOptions, ChannelStateChange, CipherParams, ConnectionDetails, ConnectionStateChange, DeltaExtras, DeviceDetails, DevicePushDetails, ErrorInfo, HttpPaginatedResponse, IdiomaticRubyWrapper, Message, NilLogger, PaginatedResult, PresenceMessage, ProtocolMessage, PushChannelSubscription, Stats, TokenDetails, TokenRequest
Class Method Summary collapse
-
.AuthDetails(attributes) ⇒ AuthDetails
Convert auth details attributes to a AuthDetails object.
-
.ChannelOptions(attributes) ⇒ ChannelOptions
Convert token details argument to a ChannelOptions object.
-
.CipherParams(attributes) ⇒ CipherParams
Convert cipher param attributes to a CipherParams object.
-
.ConnectionDetails(attributes) ⇒ ConnectionDetails
Convert connection details attributes to a ConnectionDetails object.
-
.Message(message, options = {}) ⇒ Message
Convert messsage argument to a Message object and associate with a protocol message if provided.
-
.PresenceMessage(presence_message, options = {}) ⇒ PresenceMessage
Convert presence_messsage argument to a PresenceMessage object and associate with a protocol message if provided.
-
.Stats(stat) ⇒ Stats
Convert stat argument to a Stats object.
-
.TokenDetails(attributes) ⇒ TokenDetails
Convert token details argument to a TokenDetails object.
-
.TokenRequest(attributes) ⇒ TokenRequest
Convert token request argument to a TokenRequest object.
Class Method Details
.AuthDetails(attributes) ⇒ AuthDetails
Convert auth details attributes to a AuthDetails object
7 8 9 10 11 12 13 14 |
# File 'lib/submodules/ably-ruby/lib/ably/models/auth_details.rb', line 7 def self.AuthDetails(attributes) case attributes when AuthDetails return attributes else AuthDetails.new(attributes || {}) end end |
.ChannelOptions(attributes) ⇒ ChannelOptions
Convert token details argument to a ChannelOptions object
7 8 9 10 11 12 13 14 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_options.rb', line 7 def self.ChannelOptions(attributes) case attributes when ChannelOptions return attributes else ChannelOptions.new(attributes) end end |
.CipherParams(attributes) ⇒ CipherParams
Convert cipher param attributes to a CipherParams object
10 11 12 13 14 15 16 17 |
# File 'lib/submodules/ably-ruby/lib/ably/models/cipher_params.rb', line 10 def self.CipherParams(attributes) case attributes when CipherParams return attributes else CipherParams.new(attributes || {}) end end |
.ConnectionDetails(attributes) ⇒ ConnectionDetails
Convert connection details attributes to a ConnectionDetails object
7 8 9 10 11 12 13 14 |
# File 'lib/submodules/ably-ruby/lib/ably/models/connection_details.rb', line 7 def self.ConnectionDetails(attributes) case attributes when ConnectionDetails return attributes else ConnectionDetails.new(attributes || {}) end end |
.Message(message, options = {}) ⇒ Message
Convert messsage argument to a Message object and associate with a protocol message if provided
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/submodules/ably-ruby/lib/ably/models/message.rb', line 10 def self.Message(, = {}) case when Message .tap do . [:protocol_message] if [:protocol_message] end else Message.new(, ) end end |
.PresenceMessage(presence_message, options = {}) ⇒ PresenceMessage
Convert presence_messsage argument to a PresenceMessage object and associate with a protocol message if provided
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/submodules/ably-ruby/lib/ably/models/presence_message.rb', line 8 def self.PresenceMessage(, = {}) case when PresenceMessage .tap do . [:protocol_message] if [:protocol_message] end else PresenceMessage.new(, ) end end |
.Stats(stat) ⇒ Stats
Convert stat argument to a Stats object
9 10 11 12 13 14 15 16 |
# File 'lib/submodules/ably-ruby/lib/ably/models/stats.rb', line 9 def self.Stats(stat) case stat when Stats stat else Stats.new(stat) end end |
.TokenDetails(attributes) ⇒ TokenDetails
Convert token details argument to a TokenDetails object
7 8 9 10 11 12 13 14 |
# File 'lib/submodules/ably-ruby/lib/ably/models/token_details.rb', line 7 def self.TokenDetails(attributes) case attributes when TokenDetails return attributes else TokenDetails.new(attributes) end end |
.TokenRequest(attributes) ⇒ TokenRequest
Convert token request argument to a TokenRequest object
7 8 9 10 11 12 13 14 |
# File 'lib/submodules/ably-ruby/lib/ably/models/token_request.rb', line 7 def self.TokenRequest(attributes) case attributes when TokenRequest return attributes else TokenRequest.new(attributes) end end |