Class: Craftar::Image
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#resource_uri ⇒ Object
readonly
Returns the value of attribute resource_uri.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#thumb_120 ⇒ Object
readonly
Returns the value of attribute thumb_120.
-
#thumb_60 ⇒ Object
readonly
Returns the value of attribute thumb_60.
-
#tracking_data_status ⇒ Object
readonly
Returns the value of attribute tracking_data_status.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(opts) ⇒ Image
constructor
A new instance of Image.
- #save ⇒ Object
Methods inherited from Base
basic_options, create, #destroy, find, list, parse_response
Constructor Details
#initialize(opts) ⇒ Image
Returns a new instance of Image.
9 10 11 |
# File 'lib/craftar/image.rb', line 9 def initialize(opts) set_attributes(opts) end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def file @file end |
#item ⇒ Object (readonly)
Returns the value of attribute item.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def item @item end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def name @name end |
#resource_uri ⇒ Object (readonly)
Returns the value of attribute resource_uri.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def resource_uri @resource_uri end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def status @status end |
#thumb_120 ⇒ Object (readonly)
Returns the value of attribute thumb_120.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def thumb_120 @thumb_120 end |
#thumb_60 ⇒ Object (readonly)
Returns the value of attribute thumb_60.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def thumb_60 @thumb_60 end |
#tracking_data_status ⇒ Object (readonly)
Returns the value of attribute tracking_data_status.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def tracking_data_status @tracking_data_status end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
3 4 5 |
# File 'lib/craftar/image.rb', line 3 def uuid @uuid end |
Class Method Details
.craftar_name ⇒ Object
5 6 7 |
# File 'lib/craftar/image.rb', line 5 def self.craftar_name 'image' end |
Instance Method Details
#save ⇒ Object
13 14 15 16 17 |
# File 'lib/craftar/image.rb', line 13 def save response = call(:post, file: prepare_file_from_url(@file), item: item) set_attributes(response) self end |