class Page
Attributes
items[R]
response[R]
Public Class Methods
new(response, key) { |item| ... }
click to toggle source
# File lib/restpack_activity/models/page.rb, line 11 def initialize(response, key) @response = response @key = key @items = [] response.result[key].each do |item| @items << yield(item) end end
Public Instance Methods
count()
click to toggle source
# File lib/restpack_activity/models/page.rb, line 21 def count meta :count end
next_page()
click to toggle source
# File lib/restpack_activity/models/page.rb, line 41 def next_page meta :next_page end
next_page?()
click to toggle source
# File lib/restpack_activity/models/page.rb, line 49 def next_page? next_page != nil end
page()
click to toggle source
# File lib/restpack_activity/models/page.rb, line 25 def page meta :page end
page_count()
click to toggle source
# File lib/restpack_activity/models/page.rb, line 33 def page_count meta :page_count end
page_size()
click to toggle source
# File lib/restpack_activity/models/page.rb, line 29 def page_size meta :page_size end
previous_page()
click to toggle source
# File lib/restpack_activity/models/page.rb, line 37 def previous_page meta :previous_page end
previous_page?()
click to toggle source
# File lib/restpack_activity/models/page.rb, line 45 def previous_page? previous_page != nil end
Private Instance Methods
meta(property)
click to toggle source
# File lib/restpack_activity/models/page.rb, line 55 def meta(property) @response.result[:meta][@key][property] end