Class: NTimeLine::ArticlePager

Inherits:
Pager show all
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

Attributes inherited from Pager

#page, #page_count, #request_params, #total

Attributes inherited from Base

#timeline_key, #updated

Instance Method Summary collapse

Methods inherited from Pager

#[], #next, #prev

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

#articlesObject (readonly)

Returns the value of attribute articles.



62
63
64
# File 'lib/ntimeline/pager.rb', line 62

def articles
  @articles
end