Class: Rafflesia::EpisodeArtifact

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_idObject

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_typeObject

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_atObject

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_idObject

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

#filenameObject

Returns the value of attribute filename.



25
26
27
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25

def filename
  @filename
end

#idObject

Returns the value of attribute id.



25
26
27
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25

def id
  @id
end

#kindObject

Returns the value of attribute kind.



25
26
27
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25

def kind
  @kind
end

#metadataObject

Returns the value of attribute metadata.



25
26
27
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25

def 
  @metadata
end

#objectObject

Returns the value of attribute object.



25
26
27
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25

def object
  @object
end

#object_idObject

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_idObject

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_256Object

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_bytesObject

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

#uriObject

Returns the value of attribute uri.



25
26
27
# File 'lib/rafflesia/episode_artifacts/episode_artifact.rb', line 25

def uri
  @uri
end