Class: Rafflesia::ObjectHeadData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectHeadData
- Defined in:
- lib/rafflesia/objects/object_head_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ base64: :base_64, content_type: :content_type, diagnostics: :diagnostics, encoding: :encoding, is_truncated: :is_truncated, limit: :limit, object_id: :object_id, returned_bytes: :returned_bytes, sha256: :sha_256, size_bytes: :size_bytes, text: :text }.freeze
Instance Attribute Summary collapse
-
#base_64 ⇒ Object
Returns the value of attribute base_64.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#is_truncated ⇒ Object
Returns the value of attribute is_truncated.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#object_id ⇒ Object
Returns the value of attribute object_id.
-
#returned_bytes ⇒ Object
Returns the value of attribute returned_bytes.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectHeadData
constructor
A new instance of ObjectHeadData.
Constructor Details
#initialize(json) ⇒ ObjectHeadData
Returns a new instance of ObjectHeadData.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 35 def initialize(json) super() hash = self.class.normalize(json) @base_64 = hash[:base64] @content_type = hash[:content_type] @diagnostics = hash[:diagnostics] ? Rafflesia::ObjectReadDiagnostics.new(hash[:diagnostics]) : nil @encoding = hash[:encoding] @is_truncated = hash[:is_truncated] @limit = hash[:limit] @object_id = hash[:object_id] @returned_bytes = hash[:returned_bytes] @sha_256 = hash[:sha256] @size_bytes = hash[:size_bytes] @text = hash[:text] end |
Instance Attribute Details
#base_64 ⇒ Object
Returns the value of attribute base_64.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def base_64 @base_64 end |
#content_type ⇒ Object
Returns the value of attribute content_type.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def content_type @content_type end |
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def diagnostics @diagnostics end |
#encoding ⇒ Object
Returns the value of attribute encoding.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def encoding @encoding end |
#is_truncated ⇒ Object
Returns the value of attribute is_truncated.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def is_truncated @is_truncated end |
#limit ⇒ Object
Returns the value of attribute limit.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def limit @limit end |
#object_id ⇒ Object
Returns the value of attribute object_id.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def object_id @object_id end |
#returned_bytes ⇒ Object
Returns the value of attribute returned_bytes.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def returned_bytes @returned_bytes end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def sha_256 @sha_256 end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def size_bytes @size_bytes end |
#text ⇒ Object
Returns the value of attribute text.
22 23 24 |
# File 'lib/rafflesia/objects/object_head_data.rb', line 22 def text @text end |