Class: Rmb::Asset
Instance Attribute Summary collapse
-
#artist ⇒ Object
Returns the value of attribute artist.
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#drop ⇒ Object
Returns the value of attribute drop.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#filesize ⇒ Object
Returns the value of attribute filesize.
-
#height ⇒ Object
Returns the value of attribute height.
-
#id ⇒ Object
Returns the value of attribute id.
-
#locations ⇒ Object
Returns the value of attribute locations.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#roles ⇒ Object
Returns the value of attribute roles.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
-
#track_title ⇒ Object
Returns the value of attribute track_title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
-
#width ⇒ Object
Returns the value of attribute width.
Class Method Summary collapse
-
.find(drop, id) ⇒ Object
Finds a particular Asset by drop and asset name.
Instance Method Summary collapse
-
#change_name(new_name) ⇒ Object
Changes the name of an asset.
-
#copy_to(target_drop) ⇒ Object
Copies the Asset to the given drop.
-
#destroy! ⇒ Object
Destroys the Asset on the RMB Don’t try to use an Asset after destroying it.
-
#destroy_location!(role, location) ⇒ Object
Destroys the given role at the specified location on an Asset.
-
#destroy_role!(role) ⇒ Object
Destroys the given role on an Asset.
-
#generate_url ⇒ Object
Generates an authenticated URL that will bypass any login action.
-
#move_to(target_drop) ⇒ Object
Moves the Asset to the given drop.
-
#original_file_url(time_to_live = 600) ⇒ Object
Generates a url if there’s access to the original file.
-
#save ⇒ Object
Saves the Asset back to the RMB.
-
#send_to_drop(drop) ⇒ Object
Sends the Asset to a Drop by
drop_name
.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Rmb::Resource
Instance Attribute Details
#artist ⇒ Object
Returns the value of attribute artist.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def artist @artist end |
#contents ⇒ Object
Returns the value of attribute contents.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def contents @contents end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def description @description end |
#drop ⇒ Object
Returns the value of attribute drop.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def drop @drop end |
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def duration @duration end |
#filesize ⇒ Object
Returns the value of attribute filesize.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def filesize @filesize end |
#height ⇒ Object
Returns the value of attribute height.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def id @id end |
#locations ⇒ Object
Returns the value of attribute locations.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def locations @locations end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def name @name end |
#pages ⇒ Object
Returns the value of attribute pages.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def pages @pages end |
#roles ⇒ Object
Returns the value of attribute roles.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def roles @roles end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def status @status end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def title @title end |
#track_title ⇒ Object
Returns the value of attribute track_title.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def track_title @track_title end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def url @url end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/rmb/asset.rb', line 3 def width @width end |
Class Method Details
Instance Method Details
#change_name(new_name) ⇒ Object
Changes the name of an asset.
13 14 15 |
# File 'lib/rmb/asset.rb', line 13 def change_name(new_name) Rmb::Resource.client.change_asset_name(self,new_name) end |
#copy_to(target_drop) ⇒ Object
Copies the Asset to the given drop.
41 42 43 |
# File 'lib/rmb/asset.rb', line 41 def copy_to(target_drop) Rmb::Resource.client.copy_asset(self, target_drop) end |
#destroy! ⇒ Object
Destroys the Asset on the RMB Don’t try to use an Asset after destroying it.
23 24 25 26 |
# File 'lib/rmb/asset.rb', line 23 def destroy! Rmb::Resource.client.delete_asset(self) return nil end |
#destroy_location!(role, location) ⇒ Object
Destroys the given role at the specified location on an Asset
35 36 37 38 |
# File 'lib/rmb/asset.rb', line 35 def destroy_location!(role, location) Rmb::Resource.client.delete_role(self, role, location) return nil end |
#destroy_role!(role) ⇒ Object
Destroys the given role on an Asset
29 30 31 32 |
# File 'lib/rmb/asset.rb', line 29 def destroy_role!(role) Rmb::Resource.client.delete_role(self, role) return nil end |
#generate_url ⇒ Object
Generates an authenticated URL that will bypass any login action.
56 57 58 |
# File 'lib/rmb/asset.rb', line 56 def generate_url Rmb::Resource.client.generate_asset_url(self) end |
#move_to(target_drop) ⇒ Object
Moves the Asset to the given drop.
46 47 48 |
# File 'lib/rmb/asset.rb', line 46 def move_to(target_drop) Rmb::Resource.client.move_asset(self, target_drop) end |
#original_file_url(time_to_live = 600) ⇒ Object
Generates a url if there’s access to the original file.
61 62 63 |
# File 'lib/rmb/asset.rb', line 61 def original_file_url(time_to_live = 600) Rmb::Resource.client.generate_original_file_url(self) end |