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.



691
692
693
694
695
696
697
# File 'lib/flickr/base.rb', line 691

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.



689
690
691
# File 'lib/flickr/base.rb', line 689

def author_id
  @author_id
end

#cleanObject (readonly)

Returns the value of attribute clean.



689
690
691
# File 'lib/flickr/base.rb', line 689

def clean
  @clean
end

#idObject (readonly)

Returns the value of attribute id.



689
690
691
# File 'lib/flickr/base.rb', line 689

def id
  @id
end

#rawObject (readonly)

Returns the value of attribute raw.



689
690
691
# File 'lib/flickr/base.rb', line 689

def raw
  @raw
end

Class Method Details

.from_xml(xml, flickr = nil) ⇒ Object



701
702
703
704
705
706
# File 'lib/flickr/base.rb', line 701

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



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

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