Class: Flickr::Tag
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tag) ⇒ Tag
constructor
A new instance of Tag.
Methods inherited from Base
#machine_tags, #photos, #sets, #tags
Constructor Details
#initialize(tag) ⇒ Tag
Returns a new instance of Tag.
4 5 6 |
# File 'lib/flickr-wrapper/tag.rb', line 4 def initialize(tag) @value = tag end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
2 3 4 |
# File 'lib/flickr-wrapper/tag.rb', line 2 def value @value end |
Class Method Details
.list(user_id) ⇒ Object
8 9 10 11 12 |
# File 'lib/flickr-wrapper/tag.rb', line 8 def self.list(user_id) (Flickr::Query.new(user_id).execute('flickr.tags.getListUser')/:tag).map { |tag| self.new(tag.inner_text.to_s) if tag.inner_text.to_s =~ /^([a-zA-Z0-9_-]+)$/ }.compact end |