Class: Picasa::Presenter::CommentList

Inherits:
Base
  • Object
show all
Defined in:
lib/picasa/presenter/comment_list.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_list.rb', line 7

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

#entriesArray<Presenter::Comment> Also known as: comments


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

def entries
  @entries ||= array_wrap(safe_retrieve(parsed_body, "entry")).map { |entry| Comment.new(entry) }
end

#generatorString


38
39
40
# File 'lib/picasa/presenter/comment_list.rb', line 38

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

#iconString


33
34
35
# File 'lib/picasa/presenter/comment_list.rb', line 33

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

#items_per_pageInteger


53
54
55
# File 'lib/picasa/presenter/comment_list.rb', line 53

def items_per_page
  @items_per_page ||= map_to_integer(safe_retrieve(parsed_body, "openSearch$itemsPerPage"))
end

18
19
20
# File 'lib/picasa/presenter/comment_list.rb', line 18

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

#nicknameString


63
64
65
# File 'lib/picasa/presenter/comment_list.rb', line 63

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

#start_indexInteger


48
49
50
# File 'lib/picasa/presenter/comment_list.rb', line 48

def start_index
  @start_index ||= map_to_integer(safe_retrieve(parsed_body, "openSearch$startIndex"))
end

#thumbnailString


68
69
70
# File 'lib/picasa/presenter/comment_list.rb', line 68

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

#titleString


23
24
25
# File 'lib/picasa/presenter/comment_list.rb', line 23

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

#total_resultsInteger


43
44
45
# File 'lib/picasa/presenter/comment_list.rb', line 43

def total_results
  @total_results ||= map_to_integer(safe_retrieve(parsed_body, "openSearch$totalResults"))
end

#updatedDateTime


28
29
30
# File 'lib/picasa/presenter/comment_list.rb', line 28

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

#userString


58
59
60
# File 'lib/picasa/presenter/comment_list.rb', line 58

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