Class: Rafflesia::ObjectDownloadData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectDownloadData
- Defined in:
- lib/rafflesia/objects/object_download_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ content_length_bytes: :content_length_bytes, object: :object, resolved_url: :resolved_url, retrieved_at: :retrieved_at, url: :url }.freeze
Instance Attribute Summary collapse
-
#content_length_bytes ⇒ Object
Returns the value of attribute content_length_bytes.
-
#object ⇒ Object
Returns the value of attribute object.
-
#resolved_url ⇒ Object
Returns the value of attribute resolved_url.
-
#retrieved_at ⇒ Object
Returns the value of attribute retrieved_at.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectDownloadData
constructor
A new instance of ObjectDownloadData.
Constructor Details
#initialize(json) ⇒ ObjectDownloadData
Returns a new instance of ObjectDownloadData.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/objects/object_download_data.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @content_length_bytes = hash[:content_length_bytes] @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil @resolved_url = hash[:resolved_url] @retrieved_at = hash[:retrieved_at] @url = hash[:url] end |
Instance Attribute Details
#content_length_bytes ⇒ Object
Returns the value of attribute content_length_bytes.
16 17 18 |
# File 'lib/rafflesia/objects/object_download_data.rb', line 16 def content_length_bytes @content_length_bytes end |
#object ⇒ Object
Returns the value of attribute object.
16 17 18 |
# File 'lib/rafflesia/objects/object_download_data.rb', line 16 def object @object end |
#resolved_url ⇒ Object
Returns the value of attribute resolved_url.
16 17 18 |
# File 'lib/rafflesia/objects/object_download_data.rb', line 16 def resolved_url @resolved_url end |
#retrieved_at ⇒ Object
Returns the value of attribute retrieved_at.
16 17 18 |
# File 'lib/rafflesia/objects/object_download_data.rb', line 16 def retrieved_at @retrieved_at end |
#url ⇒ Object
Returns the value of attribute url.
16 17 18 |
# File 'lib/rafflesia/objects/object_download_data.rb', line 16 def url @url end |