Class: Flickr::License

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(id, name, url) ⇒ License

Returns a new instance of License.



635
636
637
638
639
# File 'lib/flickr/base.rb', line 635

def initialize(id,name,url)
	@id = id
	@name = name
	@url = url
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



634
635
636
# File 'lib/flickr/base.rb', line 634

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



634
635
636
# File 'lib/flickr/base.rb', line 634

def name
  @name
end

#urlObject (readonly)

Returns the value of attribute url.



634
635
636
# File 'lib/flickr/base.rb', line 634

def url
  @url
end

Class Method Details

.from_xml(xml) ⇒ Object



641
642
643
644
645
# File 'lib/flickr/base.rb', line 641

def self.from_xml(xml)
	att = xml.attributes
	return Flickr::License.new(att['id'],att['name'],
		att['url'])
end