Class: Flickr::Size

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(label, width, height, source, url) ⇒ Size

Returns a new instance of Size.



342
343
344
345
346
347
348
# File 'lib/flickr/base.rb', line 342

def initialize(label,width,height,source,url)
	@label = label
	@width = width
	@height = height
	@source = source
	@url = url
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



340
341
342
# File 'lib/flickr/base.rb', line 340

def height
  @height
end

#labelObject (readonly)

Returns the value of attribute label.



340
341
342
# File 'lib/flickr/base.rb', line 340

def label
  @label
end

#sourceObject (readonly)

Returns the value of attribute source.



340
341
342
# File 'lib/flickr/base.rb', line 340

def source
  @source
end

#urlObject (readonly)

Returns the value of attribute url.



340
341
342
# File 'lib/flickr/base.rb', line 340

def url
  @url
end

#widthObject (readonly)

Returns the value of attribute width.



340
341
342
# File 'lib/flickr/base.rb', line 340

def width
  @width
end

Class Method Details

.from_xml(xml) ⇒ Object



350
351
352
353
354
# File 'lib/flickr/base.rb', line 350

def self.from_xml(xml)
	att = xml.attributes
	return Flickr::Size.new(att['label'],att['width'].to_i,
		att['height'].to_i,att['source'],att['url'])
end