Class: Flickr::Exif

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(tagspace, tagspaceid, tag, label) ⇒ Exif

Returns a new instance of Exif.



493
494
495
496
497
498
# File 'lib/flickr/base.rb', line 493

def initialize(tagspace,tagspaceid,tag,label)
  @tagspace = tagspace
  @tagspaceid = tagspaceid
  @tag = tag
  @label = label
end

Instance Attribute Details

#cleanObject

Returns the value of attribute clean.



492
493
494
# File 'lib/flickr/base.rb', line 492

def clean
  @clean
end

#labelObject (readonly)

Returns the value of attribute label.



491
492
493
# File 'lib/flickr/base.rb', line 491

def label
  @label
end

#rawObject

Returns the value of attribute raw.



492
493
494
# File 'lib/flickr/base.rb', line 492

def raw
  @raw
end

#tagObject (readonly)

Returns the value of attribute tag.



491
492
493
# File 'lib/flickr/base.rb', line 491

def tag
  @tag
end

#tagspaceObject (readonly)

Returns the value of attribute tagspace.



491
492
493
# File 'lib/flickr/base.rb', line 491

def tagspace
  @tagspace
end

#tagspaceidObject (readonly)

Returns the value of attribute tagspaceid.



491
492
493
# File 'lib/flickr/base.rb', line 491

def tagspaceid
  @tagspaceid
end

Class Method Details

.from_xml(element) ⇒ Object



500
501
502
503
504
505
506
507
508
# File 'lib/flickr/base.rb', line 500

def self.from_xml(element)
  att = element.attributes
  exif = Flickr::Exif.new(att['tagspace'],att['tagspaceid'].to_i,
                          att['tag'],att['label'])
  exif.raw=element.elements['raw'].text if element.elements['raw']
  exif.clean=element.elements['clean'].text if
  element.elements['clean']
  return exif
end