Class: NTimeLine::TimeLinePager

Inherits:
Pager show all
Defined in:
lib/ntimeline/pager.rb

Overview

TimelinePager is a pager of timelines search result summary.

Constant Summary collapse

PATH =
"/timelines/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) ⇒ TimeLinePager

:nodoc:



49
50
51
52
53
54
55
# File 'lib/ntimeline/pager.rb', line 49

def initialize(doc) #:nodoc:
  super(doc)
  @timelines = []
  doc.root.each_element("/response/result/timelines/timeline") do |timeline|
    @timelines << TimeLine.new(timeline)
  end
end

Instance Attribute Details

#timelinesObject (readonly)

Returns the value of attribute timelines.



47
48
49
# File 'lib/ntimeline/pager.rb', line 47

def timelines
  @timelines
end