Class: Shutterstock::ImageSizeDetails
- Defined in:
- lib/client/image_size_details.rb
Constant Summary
Constants inherited from Driver
Instance Attribute Summary collapse
-
#display_name ⇒ Object
(also: #name)
readonly
Returns the value of attribute display_name.
-
#dpi ⇒ Object
readonly
Returns the value of attribute dpi.
-
#file_size ⇒ Object
readonly
Returns the value of attribute file_size.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#is_licensable ⇒ Object
readonly
Returns the value of attribute is_licensable.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ImageSizeDetails
constructor
“display_name”:“Huge”,“dpi”:300,“file_size”:1103872,“format”:“jpg”,“height”:5000,“is_licensable”:false,“width”:5000.
- #licensable? ⇒ Boolean
Methods inherited from Driver
api, client, #client, #json_true?, #methods, #respond_to, #to_date
Constructor Details
#initialize(params = {}) ⇒ ImageSizeDetails
“display_name”:“Huge”,“dpi”:300,“file_size”:1103872,“format”:“jpg”,“height”:5000,“is_licensable”:false,“width”:5000
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/client/image_size_details.rb', line 7 def initialize(params = {}) @hash = params @height = params["height"].to_i if params["height"] # (integer, optional), @width = params["width"].to_i if params["width"] # (integer, optional), @file_size = params["file_size"].to_i if params["file_size"] # (integer, optional), @display_name = params["display_name"] # (string, optional), @dpi = params["dpi"].to_i if params["dpi"] # (integer, optional), @format = params["format"] # (string, optional), @is_licensable = json_true? params["is_licensable"] # (boolean, optional) end |
Instance Attribute Details
#display_name ⇒ Object (readonly) Also known as: name
Returns the value of attribute display_name.
3 4 5 |
# File 'lib/client/image_size_details.rb', line 3 def display_name @display_name end |
#dpi ⇒ Object (readonly)
Returns the value of attribute dpi.
3 4 5 |
# File 'lib/client/image_size_details.rb', line 3 def dpi @dpi end |
#file_size ⇒ Object (readonly)
Returns the value of attribute file_size.
3 4 5 |
# File 'lib/client/image_size_details.rb', line 3 def file_size @file_size end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
3 4 5 |
# File 'lib/client/image_size_details.rb', line 3 def format @format end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
3 4 5 |
# File 'lib/client/image_size_details.rb', line 3 def hash @hash end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/client/image_size_details.rb', line 3 def height @height end |
#is_licensable ⇒ Object (readonly)
Returns the value of attribute is_licensable.
3 4 5 |
# File 'lib/client/image_size_details.rb', line 3 def is_licensable @is_licensable end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
3 4 5 |
# File 'lib/client/image_size_details.rb', line 3 def width @width end |
Instance Method Details
#licensable? ⇒ Boolean
20 21 22 |
# File 'lib/client/image_size_details.rb', line 20 def licensable? @is_licensable end |