Class: Ably::Models::DeltaExtras
- Inherits:
-
Object
- Object
- Ably::Models::DeltaExtras
- Includes:
- Ably::Modules::ModelCommon
- Defined in:
- lib/submodules/ably-ruby/lib/ably/models/delta_extras.rb
Instance Attribute Summary collapse
-
#format ⇒ String?
readonly
The delta format.
-
#from ⇒ String?
readonly
The id of the message the delta was generated from.
Attributes included from Ably::Modules::ModelCommon
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DeltaExtras
constructor
A new instance of DeltaExtras.
- #to_json(*args) ⇒ Object
Methods included from Ably::Modules::ModelCommon
#==, #[], #as_json, included, #to_s
Methods included from Ably::Modules::MessagePack
Constructor Details
#initialize(attributes = {}) ⇒ DeltaExtras
Returns a new instance of DeltaExtras.
21 22 23 |
# File 'lib/submodules/ably-ruby/lib/ably/models/delta_extras.rb', line 21 def initialize(attributes = {}) @from, @format = IdiomaticRubyWrapper((attributes || {}), stop_at: [:from, :format]).attributes.values_at(:from, :format) end |
Instance Attribute Details
#format ⇒ String? (readonly)
The delta format.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/submodules/ably-ruby/lib/ably/models/delta_extras.rb', line 8 class DeltaExtras include Ably::Modules::ModelCommon # The id of the message the delta was generated from. # @return [String, nil] # attr_reader :from # The delta format. # @return [String, nil] # attr_reader :format def initialize(attributes = {}) @from, @format = IdiomaticRubyWrapper((attributes || {}), stop_at: [:from, :format]).attributes.values_at(:from, :format) end def to_json(*args) as_json(args).to_json end end |
#from ⇒ String? (readonly)
The id of the message the delta was generated from.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/submodules/ably-ruby/lib/ably/models/delta_extras.rb', line 8 class DeltaExtras include Ably::Modules::ModelCommon # The id of the message the delta was generated from. # @return [String, nil] # attr_reader :from # The delta format. # @return [String, nil] # attr_reader :format def initialize(attributes = {}) @from, @format = IdiomaticRubyWrapper((attributes || {}), stop_at: [:from, :format]).attributes.values_at(:from, :format) end def to_json(*args) as_json(args).to_json end end |
Instance Method Details
#to_json(*args) ⇒ Object
25 26 27 |
# File 'lib/submodules/ably-ruby/lib/ably/models/delta_extras.rb', line 25 def to_json(*args) as_json(args).to_json end |