Class: Fotolia::Tag

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

Overview

Represents a tag at Fotolia.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#popularityObject (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_sObject



14
15
16
# File 'lib/fotolia/tag.rb', line 14

def to_s
  @name.to_s
end