Class: Net::Flickr::Tag
- Inherits:
-
Object
- Object
- Net::Flickr::Tag
- Defined in:
- lib/net/flickr/tag.rb
Overview
A Flickr photo tag.
Don’t instantiate this class yourself.
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(flickr, tag_xml) ⇒ Tag
constructor
A new instance of Tag.
-
#machine? ⇒ Boolean
true
if this tag is a machine tag,false
otherwise.
Constructor Details
#initialize(flickr, tag_xml) ⇒ Tag
Returns a new instance of Tag.
38 39 40 41 42 43 44 45 46 |
# File 'lib/net/flickr/tag.rb', line 38 def initialize(flickr, tag_xml) @flickr = flickr @id = tag_xml['id'] @author = tag_xml['author'] @raw = tag_xml['raw'] @name = tag_xml.inner_text @machine_tag = tax_xml['machine_tag'] == '1' end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
36 37 38 |
# File 'lib/net/flickr/tag.rb', line 36 def @author end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
36 37 38 |
# File 'lib/net/flickr/tag.rb', line 36 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/net/flickr/tag.rb', line 36 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
36 37 38 |
# File 'lib/net/flickr/tag.rb', line 36 def raw @raw end |
Instance Method Details
#machine? ⇒ Boolean
true
if this tag is a machine tag, false
otherwise.
49 50 51 |
# File 'lib/net/flickr/tag.rb', line 49 def machine? return @machine_tag end |