Module: Ably::Models
- Defined in:
- lib/ably/models/stats.rb,
lib/ably/models/message.rb,
lib/ably/models/error_info.rb,
lib/ably/models/nil_logger.rb,
lib/ably/models/stats_types.rb,
lib/ably/models/cipher_params.rb,
lib/ably/models/token_details.rb,
lib/ably/models/token_request.rb,
lib/ably/models/paginated_result.rb,
lib/ably/models/presence_message.rb,
lib/ably/models/protocol_message.rb,
lib/ably/models/connection_details.rb,
lib/ably/models/channel_state_change.rb,
lib/ably/models/idiomatic_ruby_wrapper.rb,
lib/ably/models/connection_state_change.rb
Defined Under Namespace
Modules: MessageEncoders Classes: ChannelStateChange, CipherParams, ConnectionDetails, ConnectionStateChange, ErrorInfo, IdiomaticRubyWrapper, Message, NilLogger, PaginatedResult, PresenceMessage, ProtocolMessage, Stats, TokenDetails, TokenRequest
Class Method Summary collapse
-
.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
.CipherParams(attributes) ⇒ CipherParams
Convert cipher param attributes to a CipherParams object
10 11 12 13 14 15 16 17 |
# File '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/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
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ably/models/message.rb', line 8 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/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/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/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/ably/models/token_request.rb', line 7 def self.TokenRequest(attributes) case attributes when TokenRequest return attributes else TokenRequest.new(attributes) end end |