Class: Ably::Models::DeltaExtras
- Inherits:
-
Object
- Object
- Ably::Models::DeltaExtras
- Includes:
- Ably::Modules::ModelCommon
- Defined in:
- lib/ably/models/delta_extras.rb
Overview
Contains any arbitrary key-value pairs, which may also contain other primitive JSON types, JSON-encodable objects, or JSON-encodable arrays from delta compression.
Instance Attribute Summary collapse
-
#format ⇒ String?
readonly
The delta compression 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.
20 21 22 |
# File 'lib/ably/models/delta_extras.rb', line 20 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 compression format. Only vcdiff is supported.
18 19 20 |
# File 'lib/ably/models/delta_extras.rb', line 18 def format @format end |
#from ⇒ String? (readonly)
The ID of the message the delta was generated from.
12 13 14 |
# File 'lib/ably/models/delta_extras.rb', line 12 def from @from end |
Instance Method Details
#to_json(*args) ⇒ Object
24 25 26 |
# File 'lib/ably/models/delta_extras.rb', line 24 def to_json(*args) as_json(args).to_json end |