Class: Shutterstock::ImageSizeDetails

Inherits:
Driver
  • Object
show all
Defined in:
lib/client/image_size_details.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 = {}) ⇒ 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_nameObject (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

#dpiObject (readonly)

Returns the value of attribute dpi.



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

def dpi
  @dpi
end

#file_sizeObject (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

#formatObject (readonly)

Returns the value of attribute format.



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

def format
  @format
end

#hashObject (readonly)

Returns the value of attribute hash.



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

def hash
  @hash
end

#heightObject (readonly)

Returns the value of attribute height.



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

def height
  @height
end

#is_licensableObject (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

#widthObject (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

Returns:

  • (Boolean)


20
21
22
# File 'lib/client/image_size_details.rb', line 20

def licensable?
  @is_licensable
end