Class: Shutterstock::Category

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

Returns a new instance of Category.



7
8
9
10
11
# File 'lib/client/category.rb', line 7

def initialize(params={})
	@hash         = params
    @id           = params["id"].to_i
	@name           = params["name"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end