Class: Browserbeam::Changes
- Inherits:
-
Struct
- Object
- Struct
- Browserbeam::Changes
- Defined in:
- lib/browserbeam/types.rb
Instance Attribute Summary collapse
-
#content_changed ⇒ Object
Returns the value of attribute content_changed.
-
#content_delta ⇒ Object
Returns the value of attribute content_delta.
-
#elements_added ⇒ Object
Returns the value of attribute elements_added.
-
#elements_removed ⇒ Object
Returns the value of attribute elements_removed.
Class Method Summary collapse
Instance Attribute Details
#content_changed ⇒ Object
Returns the value of attribute content_changed
27 28 29 |
# File 'lib/browserbeam/types.rb', line 27 def content_changed @content_changed end |
#content_delta ⇒ Object
Returns the value of attribute content_delta
27 28 29 |
# File 'lib/browserbeam/types.rb', line 27 def content_delta @content_delta end |
#elements_added ⇒ Object
Returns the value of attribute elements_added
27 28 29 |
# File 'lib/browserbeam/types.rb', line 27 def elements_added @elements_added end |
#elements_removed ⇒ Object
Returns the value of attribute elements_removed
27 28 29 |
# File 'lib/browserbeam/types.rb', line 27 def elements_removed @elements_removed end |
Class Method Details
.from_hash(data) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/browserbeam/types.rb', line 28 def self.from_hash(data) return nil unless data.is_a?(Hash) new( content_changed: data["content_changed"] || false, content_delta: data["content_delta"], elements_added: data["elements_added"] || [], elements_removed: data["elements_removed"] || [], ) end |