Class: Fotolia::Tag
- Inherits:
-
Object
- Object
- Fotolia::Tag
- Defined in:
- lib/fotolia/tag.rb
Overview
Represents a tag at Fotolia.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#popularity ⇒ Object
readonly
Returns the value of attribute popularity.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Tag
constructor
A new instance of Tag.
- #to_s ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Tag
Returns a new instance of Tag.
9 10 11 12 |
# File 'lib/fotolia/tag.rb', line 9 def initialize(attributes) @name = attributes['name'] @popularity = attributes['popularity'].to_i end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/fotolia/tag.rb', line 6 def name @name end |
#popularity ⇒ Object (readonly)
Returns the value of attribute popularity.
7 8 9 |
# File 'lib/fotolia/tag.rb', line 7 def popularity @popularity end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/fotolia/tag.rb', line 14 def to_s @name.to_s end |