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.



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

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.



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

def author_id
  @author_id
end

#cleanObject (readonly)

Returns the value of attribute clean.



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

def clean
  @clean
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#rawObject (readonly)

Returns the value of attribute raw.



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

def raw
  @raw
end

Class Method Details

.from_xml(xml, flickr = nil) ⇒ Object



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

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



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

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