Class: Fotolia::Country

Inherits:
Object
  • Object
show all
Defined in:
lib/fotolia/country.rb

Overview

Represents one country at Fotolia.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Country

Returns a new instance of Country.



9
10
11
12
# File 'lib/fotolia/country.rb', line 9

def initialize(attributes)
  @id = attributes['id'].to_i
  @name = attributes['name']
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/fotolia/country.rb', line 6

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/fotolia/country.rb', line 7

def name
  @name
end