Class: Fotolia::Country
- Inherits:
-
Object
- Object
- Fotolia::Country
- Defined in:
- lib/fotolia/country.rb
Overview
Represents one country at Fotolia.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Country
constructor
A new instance of Country.
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/fotolia/country.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/fotolia/country.rb', line 7 def name @name end |