class ComicVine::CVObjectList

Attributes

resource[R]

Public Class Methods

new(resp, resc) click to toggle source
Calls superclass method ComicVine::CVList::new
# File lib/comic_vine/cv_list.rb, line 43
def initialize(resp, resc)      
  super(resp)
  
  @resource = resc
  @cvos = resp['results'].map{ |r| ComicVine::CVObject.new(r)}
end

Public Instance Methods

next_page() click to toggle source
# File lib/comic_vine/cv_list.rb, line 50
def next_page
  return nil if (@offset + @page_count) >= @total_count
  update_ivals(ComicVine::API.send(@resource, {:limit => @limit, :offset => (@offset + @page_count)}))
end
prev_page() click to toggle source
# File lib/comic_vine/cv_list.rb, line 55
def prev_page
  return nil if @offset == 0
  update_ivals(ComicVine::API.send(@resource, {:limit => @limit, :offset => (@offset - @page_count)}))
end