Class: Picasa::Presenter::Comment

Inherits:
Base
  • Object
show all
Defined in:
lib/picasa/presenter/comment.rb

Instance Attribute Summary

Attributes inherited from Base

#parsed_body

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect

Methods included from Utils

array_wrap, inline_query, map_to_boolean, map_to_date, map_to_float, map_to_integer, retrieve, safe_retrieve

Constructor Details

This class inherits a constructor from Picasa::Presenter::Base

Instance Method Details

#authorPresenter::Author


7
8
9
# File 'lib/picasa/presenter/comment.rb', line 7

def author
  @author ||= Author.new(parsed_body["author"][0])
end

#contentString


42
43
44
# File 'lib/picasa/presenter/comment.rb', line 42

def content
  @content ||= safe_retrieve(parsed_body, "content", "$t")
end

#editedDateTime


27
28
29
# File 'lib/picasa/presenter/comment.rb', line 27

def edited
  @edited ||= map_to_date(safe_retrieve(parsed_body, "edited"))
end

#etagString


37
38
39
# File 'lib/picasa/presenter/comment.rb', line 37

def etag
  @etag ||= safe_retrieve(parsed_body, "gd$etag")
end

#idString


47
48
49
# File 'lib/picasa/presenter/comment.rb', line 47

def id
  @id ||= safe_retrieve(parsed_body, "gphoto$id")
end

12
13
14
# File 'lib/picasa/presenter/comment.rb', line 12

def links
  @links ||= array_wrap(safe_retrieve(parsed_body, "link")).map { |link| Link.new(link) }
end

#photo_idString


52
53
54
# File 'lib/picasa/presenter/comment.rb', line 52

def photo_id
  @photo_id ||= safe_retrieve(parsed_body, "gphoto$photoid")
end

#publishedDateTime


17
18
19
# File 'lib/picasa/presenter/comment.rb', line 17

def published
  @published ||= map_to_date(safe_retrieve(parsed_body, "published"))
end

#titleString


32
33
34
# File 'lib/picasa/presenter/comment.rb', line 32

def title
  @title ||= safe_retrieve(parsed_body, "title")
end

#updatedDateTime


22
23
24
# File 'lib/picasa/presenter/comment.rb', line 22

def updated
  @updated ||= map_to_date(safe_retrieve(parsed_body, "updated"))
end