Class: Picasa::Presenter::Comment
- Inherits:
-
Base
- Object
- Base
- Picasa::Presenter::Comment
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
Instance Method Details
7
8
9
|
# File 'lib/picasa/presenter/comment.rb', line 7
def author
@author ||= Author.new(parsed_body["author"][0])
end
|
#content ⇒ String
42
43
44
|
# File 'lib/picasa/presenter/comment.rb', line 42
def content
@content ||= safe_retrieve(parsed_body, "content", "$t")
end
|
#edited ⇒ DateTime
27
28
29
|
# File 'lib/picasa/presenter/comment.rb', line 27
def edited
@edited ||= map_to_date(safe_retrieve(parsed_body, "edited"))
end
|
#etag ⇒ String
37
38
39
|
# File 'lib/picasa/presenter/comment.rb', line 37
def etag
@etag ||= safe_retrieve(parsed_body, "gd$etag")
end
|
#id ⇒ String
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_id ⇒ String
52
53
54
|
# File 'lib/picasa/presenter/comment.rb', line 52
def photo_id
@photo_id ||= safe_retrieve(parsed_body, "gphoto$photoid")
end
|
#published ⇒ DateTime
17
18
19
|
# File 'lib/picasa/presenter/comment.rb', line 17
def published
@published ||= map_to_date(safe_retrieve(parsed_body, "published"))
end
|
#title ⇒ String
32
33
34
|
# File 'lib/picasa/presenter/comment.rb', line 32
def title
@title ||= safe_retrieve(parsed_body, "title")
end
|
#updated ⇒ DateTime
22
23
24
|
# File 'lib/picasa/presenter/comment.rb', line 22
def updated
@updated ||= map_to_date(safe_retrieve(parsed_body, "updated"))
end
|