Class: Rafflesia::EpisodeArtifact
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::EpisodeArtifact
- Defined in:
- lib/rafflesia/episode_artifacts/episode_artifact.rb
Constant Summary collapse
- HASH_ATTRS =
{ attempt_id: :attempt_id, content_type: :content_type, created_at: :created_at, episode_id: :episode_id, filename: :filename, id: :id, kind: :kind, metadata: :metadata, object: :object, object_id: :object_id, organization_id: :organization_id, sha256: :sha_256, size_bytes: :size_bytes, uri: :uri }.freeze
Instance Attribute Summary collapse
-
#attempt_id ⇒ Object
Returns the value of attribute attempt_id.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#episode_id ⇒ Object
Returns the value of attribute episode_id.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#id ⇒ Object
Returns the value of attribute id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#object ⇒ Object
Returns the value of attribute object.
-
#object_id ⇒ Object
Returns the value of attribute object_id.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(json) ⇒ EpisodeArtifact
constructor
A new instance of EpisodeArtifact.
Constructor Details
#initialize(json) ⇒ EpisodeArtifact
Returns a new instance of EpisodeArtifact.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @attempt_id = hash[:attempt_id] @content_type = hash[:content_type] @created_at = hash[:created_at] @episode_id = hash[:episode_id] @filename = hash[:filename] @id = hash[:id] @kind = hash[:kind] @metadata = hash[:metadata] || {} @object = hash[:object] @object_id = hash[:object_id] @organization_id = hash[:organization_id] @sha_256 = hash[:sha256] @size_bytes = hash[:size_bytes] @uri = hash[:uri] end |
Instance Attribute Details
#attempt_id ⇒ Object
Returns the value of attribute attempt_id.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def attempt_id @attempt_id end |
#content_type ⇒ Object
Returns the value of attribute content_type.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def content_type @content_type end |
#created_at ⇒ Object
Returns the value of attribute created_at.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def created_at @created_at end |
#episode_id ⇒ Object
Returns the value of attribute episode_id.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def episode_id @episode_id end |
#filename ⇒ Object
Returns the value of attribute filename.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def filename @filename end |
#id ⇒ Object
Returns the value of attribute id.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def id @id end |
#kind ⇒ Object
Returns the value of attribute kind.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def kind @kind end |
#metadata ⇒ Object
Returns the value of attribute metadata.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def @metadata end |
#object ⇒ Object
Returns the value of attribute object.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def object @object end |
#object_id ⇒ Object
Returns the value of attribute object_id.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def object_id @object_id end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def organization_id @organization_id end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def sha_256 @sha_256 end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def size_bytes @size_bytes end |
#uri ⇒ Object
Returns the value of attribute uri.
25 26 27 |
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25 def uri @uri end |