Class: Shutterstock::Thumbnail

Inherits:
Driver
  • Object
show all
Defined in:
lib/client/thumbnail.rb

Constant Summary

Constants inherited from Driver

Driver::TRUTHY_JSON_VALUES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Driver

api, client, #client, #json_true?, #methods, #respond_to, #to_date

Constructor Details

#initialize(params = {}) ⇒ Thumbnail

“display_name”:“Huge”,“dpi”:300,“file_size”:1103872,“format”:“jpg”,“height”:5000,“is_licensable”:false,“width”:5000



9
10
11
12
13
14
# File 'lib/client/thumbnail.rb', line 9

def initialize(params = {})
  @hash                       = params
  @url                        = params["url"]         # (string),
  @height                     = params["height"].to_i # (integer),
  @width                      = params["width"].to_i  # (integer)
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



3
4
5
# File 'lib/client/thumbnail.rb', line 3

def hash
  @hash
end

#heightObject (readonly)

Returns the value of attribute height.



3
4
5
# File 'lib/client/thumbnail.rb', line 3

def height
  @height
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/client/thumbnail.rb', line 3

def url
  @url
end

#widthObject (readonly)

Returns the value of attribute width.



3
4
5
# File 'lib/client/thumbnail.rb', line 3

def width
  @width
end