Class: Flickr::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/flickr/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(flickr, id, author_id, raw, clean) ⇒ Tag

Returns a new instance of Tag.



675
676
677
678
679
680
681
# File 'lib/flickr/base.rb', line 675

def initialize(flickr, id,author_id,raw,clean)
  @flickr = flickr
  @id = id
  @author_id = author_id
  @raw = raw
  @clean = clean
end

Instance Attribute Details

#author_idObject (readonly)

Returns the value of attribute author_id.



673
674
675
# File 'lib/flickr/base.rb', line 673

def author_id
  @author_id
end

#cleanObject (readonly)

Returns the value of attribute clean.



673
674
675
# File 'lib/flickr/base.rb', line 673

def clean
  @clean
end

#idObject (readonly)

Returns the value of attribute id.



673
674
675
# File 'lib/flickr/base.rb', line 673

def id
  @id
end

#rawObject (readonly)

Returns the value of attribute raw.



673
674
675
# File 'lib/flickr/base.rb', line 673

def raw
  @raw
end

Class Method Details

.from_xml(xml, flickr = nil) ⇒ Object



685
686
687
688
689
690
# File 'lib/flickr/base.rb', line 685

def self.from_xml(xml,flickr=nil)
  att = xml.attributes
  clean = xml.text
  return Flickr::Tag.new(flickr,att['id'],att['author'],
                         att['raw'], clean)
end

Instance Method Details

#authorObject



683
# File 'lib/flickr/base.rb', line 683

def author() @flickr.people.getInfo(@author_id) end