Class: Flickr::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/flickr/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#authoridObject

Returns the value of attribute authorid.



797
798
799
# File 'lib/flickr/base.rb', line 797

def authorid
  @authorid
end

#authornameObject

Returns the value of attribute authorname.



797
798
799
# File 'lib/flickr/base.rb', line 797

def authorname
  @authorname
end

#datecreatedObject

Returns the value of attribute datecreated.



797
798
799
# File 'lib/flickr/base.rb', line 797

def datecreated
  @datecreated
end

#idObject

Returns the value of attribute id.



797
798
799
# File 'lib/flickr/base.rb', line 797

def id
  @id
end

Returns the value of attribute permalink.



797
798
799
# File 'lib/flickr/base.rb', line 797

def permalink
  @permalink
end

#textObject

Returns the value of attribute text.



797
798
799
# File 'lib/flickr/base.rb', line 797

def text
  @text
end

Class Method Details

.from_xml(xml, flickr = nil) ⇒ Object



799
800
801
802
803
804
805
806
807
808
809
# File 'lib/flickr/base.rb', line 799

def self.from_xml(xml, flickr=nil)
  att = xml.attributes
  c = new
  c.id = att['id']
  c.authorid = att['author']
  c.authorname = att['authorname']
  c.datecreated = Time.at(att['datecreate'].to_i)
  c.permalink = att['permalink']
  c.text = xml.text
  c
end