Class: Flickr::Size
- Inherits:
-
Object
- Object
- Flickr::Size
- Defined in:
- lib/flickr/base.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(label, width, height, source, url) ⇒ Size
constructor
A new instance of Size.
Constructor Details
#initialize(label, width, height, source, url) ⇒ Size
Returns a new instance of Size.
345 346 347 348 349 350 351 |
# File 'lib/flickr/base.rb', line 345 def initialize(label,width,height,source,url) @label = label @width = width @height = height @source = source @url = url end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
343 344 345 |
# File 'lib/flickr/base.rb', line 343 def height @height end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
343 344 345 |
# File 'lib/flickr/base.rb', line 343 def label @label end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
343 344 345 |
# File 'lib/flickr/base.rb', line 343 def source @source end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
343 344 345 |
# File 'lib/flickr/base.rb', line 343 def url @url end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
343 344 345 |
# File 'lib/flickr/base.rb', line 343 def width @width end |
Class Method Details
.from_xml(xml) ⇒ Object
353 354 355 356 357 |
# File 'lib/flickr/base.rb', line 353 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 |