Class: StrawberryAPI::Asset
- Inherits:
-
Object
- Object
- StrawberryAPI::Asset
- Defined in:
- lib/strawberry_api/asset.rb
Instance Attribute Summary collapse
-
#archive_strategy_id ⇒ Object
Returns the value of attribute archive_strategy_id.
-
#audio ⇒ Object
Returns the value of attribute audio.
-
#avid ⇒ Object
Returns the value of attribute avid.
-
#clip_names ⇒ Object
Returns the value of attribute clip_names.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#descriptions ⇒ Object
Returns the value of attribute descriptions.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#file_names ⇒ Object
Returns the value of attribute file_names.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image ⇒ Object
Returns the value of attribute image.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#name ⇒ Object
Returns the value of attribute name.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#size ⇒ Object
Returns the value of attribute size.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#video ⇒ Object
Returns the value of attribute video.
Instance Method Summary collapse
- #audio? ⇒ Boolean
- #image? ⇒ Boolean
-
#initialize(params = {}) ⇒ Asset
constructor
A new instance of Asset.
- #video? ⇒ Boolean
Constructor Details
#initialize(params = {}) ⇒ Asset
Returns a new instance of Asset
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/strawberry_api/asset.rb', line 25 def initialize(params = {}) params.each do |k, v| if k == 'proxy' v = Proxy.new(v) elsif k == 'metadata' v&.map! do || Metadatum.new() end end instance_variable_set("@#{k.gsub(/[!@#$%^&*?']/, '')}", v) unless v.nil? end end |
Instance Attribute Details
#archive_strategy_id ⇒ Object
Returns the value of attribute archive_strategy_id
7 8 9 |
# File 'lib/strawberry_api/asset.rb', line 7 def archive_strategy_id @archive_strategy_id end |
#audio ⇒ Object
Returns the value of attribute audio
13 14 15 |
# File 'lib/strawberry_api/asset.rb', line 13 def audio @audio end |
#avid ⇒ Object
Returns the value of attribute avid
16 17 18 |
# File 'lib/strawberry_api/asset.rb', line 16 def avid @avid end |
#clip_names ⇒ Object
Returns the value of attribute clip_names
22 23 24 |
# File 'lib/strawberry_api/asset.rb', line 22 def clip_names @clip_names end |
#created_at ⇒ Object
Returns the value of attribute created_at
10 11 12 |
# File 'lib/strawberry_api/asset.rb', line 10 def created_at @created_at end |
#descriptions ⇒ Object
Returns the value of attribute descriptions
20 21 22 |
# File 'lib/strawberry_api/asset.rb', line 20 def descriptions @descriptions end |
#duration ⇒ Object
Returns the value of attribute duration
19 20 21 |
# File 'lib/strawberry_api/asset.rb', line 19 def duration @duration end |
#file_names ⇒ Object
Returns the value of attribute file_names
17 18 19 |
# File 'lib/strawberry_api/asset.rb', line 17 def file_names @file_names end |
#id ⇒ Object
Returns the value of attribute id
5 6 7 |
# File 'lib/strawberry_api/asset.rb', line 5 def id @id end |
#image ⇒ Object
Returns the value of attribute image
14 15 16 |
# File 'lib/strawberry_api/asset.rb', line 14 def image @image end |
#metadata ⇒ Object
Returns the value of attribute metadata
21 22 23 |
# File 'lib/strawberry_api/asset.rb', line 21 def @metadata end |
#name ⇒ Object
Returns the value of attribute name
8 9 10 |
# File 'lib/strawberry_api/asset.rb', line 8 def name @name end |
#project_id ⇒ Object
Returns the value of attribute project_id
6 7 8 |
# File 'lib/strawberry_api/asset.rb', line 6 def project_id @project_id end |
#project_name ⇒ Object
Returns the value of attribute project_name
9 10 11 |
# File 'lib/strawberry_api/asset.rb', line 9 def project_name @project_name end |
#proxy ⇒ Object
Returns the value of attribute proxy
23 24 25 |
# File 'lib/strawberry_api/asset.rb', line 23 def proxy @proxy end |
#size ⇒ Object
Returns the value of attribute size
12 13 14 |
# File 'lib/strawberry_api/asset.rb', line 12 def size @size end |
#type ⇒ Object
Returns the value of attribute type
18 19 20 |
# File 'lib/strawberry_api/asset.rb', line 18 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
11 12 13 |
# File 'lib/strawberry_api/asset.rb', line 11 def updated_at @updated_at end |
#video ⇒ Object
Returns the value of attribute video
15 16 17 |
# File 'lib/strawberry_api/asset.rb', line 15 def video @video end |
Instance Method Details
#audio? ⇒ Boolean
39 40 41 |
# File 'lib/strawberry_api/asset.rb', line 39 def audio? audio end |
#image? ⇒ Boolean
43 44 45 |
# File 'lib/strawberry_api/asset.rb', line 43 def image? image end |
#video? ⇒ Boolean
47 48 49 |
# File 'lib/strawberry_api/asset.rb', line 47 def video? video end |