Class: NTimeLine::ArticlePager
- Defined in:
- lib/ntimeline/pager.rb
Overview
ArticlePager is a pager of aritcles search result summary.
Constant Summary collapse
- PATH =
"/articles/search"
Instance Attribute Summary collapse
-
#articles ⇒ Object
readonly
Returns the value of attribute articles.
Attributes inherited from Pager
#page, #page_count, #request_params, #total
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(doc) ⇒ ArticlePager
constructor
:nodoc:.
Methods inherited from Pager
Methods inherited from Base
bool_data, #init, int_data, #refresh, request, #request, request_with_key, #request_with_key, text_data, time_data, url_data
Constructor Details
#initialize(doc) ⇒ ArticlePager
:nodoc:
64 65 66 67 68 69 70 |
# File 'lib/ntimeline/pager.rb', line 64 def initialize(doc) #:nodoc: super(doc) @articles = [] doc.root.each_element("/response/result/articles/article") do |article| @articles << Article.new(article) end end |
Instance Attribute Details
#articles ⇒ Object (readonly)
Returns the value of attribute articles.
62 63 64 |
# File 'lib/ntimeline/pager.rb', line 62 def articles @articles end |