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.



358
359
360
361
362
363
364
# File 'lib/flickr/base.rb', line 358

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.



356
357
358
# File 'lib/flickr/base.rb', line 356

def height
  @height
end

#labelObject (readonly)

Returns the value of attribute label.



356
357
358
# File 'lib/flickr/base.rb', line 356

def label
  @label
end

#sourceObject (readonly)

Returns the value of attribute source.



356
357
358
# File 'lib/flickr/base.rb', line 356

def source
  @source
end

#urlObject (readonly)

Returns the value of attribute url.



356
357
358
# File 'lib/flickr/base.rb', line 356

def url
  @url
end

#widthObject (readonly)

Returns the value of attribute width.



356
357
358
# File 'lib/flickr/base.rb', line 356

def width
  @width
end

Class Method Details

.from_xml(xml) ⇒ Object



366
367
368
369
370
# File 'lib/flickr/base.rb', line 366

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