class ComicVine::ResourceList
Class container for multiple ComicVine
resources @since 0.1.0
Attributes
resource[R]
Public Class Methods
new(resp, resc)
click to toggle source
Calls superclass method
ComicVine::List::new
# File lib/comicvine/list.rb, line 67 def initialize(resp, resc) super(resp) @resource = resc @cvos = resp['results'].map { |r| ComicVine::Resource.create_resource(r) } end
Public Instance Methods
next_page()
click to toggle source
Loads the next page results
# File lib/comicvine/list.rb, line 75 def next_page return nil if (@offset + @page_count) >= @total_count update_ivals(ComicVine::API.send(@resource, {:limit => @limit, :offset => (@offset + @page_count)})) end
Also aliased as: next_page!
prev_page()
click to toggle source
Loads the previous page results
# File lib/comicvine/list.rb, line 81 def prev_page return nil if @offset == 0 update_ivals(ComicVine::API.send(@resource, {:limit => @limit, :offset => (@offset - @page_count)})) end
Also aliased as: prev_page!