class ComicVine::CVList

Attributes

cvos[R]
limit[R]
offset[R]
page_count[R]
total_count[R]

Public Class Methods

new(resp) click to toggle source
# File lib/comic_vine/cv_list.rb, line 11
def initialize(resp)      
  @total_count = resp['number_of_total_results']
  @page_count = resp['number_of_page_results']
  @offset = resp['offset']
  @limit = resp['limit']
end

Public Instance Methods

each() { |c| ... } click to toggle source
# File lib/comic_vine/cv_list.rb, line 18
def each
  @cvos.each { |c| yield c }
end
last() click to toggle source
# File lib/comic_vine/cv_list.rb, line 22
def last
  @cvos.last
end
page() click to toggle source
# File lib/comic_vine/cv_list.rb, line 26
def page
  (@offset / @limit) + 1
end

Protected Instance Methods

update_ivals(new_cvol) click to toggle source
# File lib/comic_vine/cv_list.rb, line 31
def update_ivals(new_cvol)
  @total_count = new_cvol.total_count
  @offset = new_cvol.offset
  @limit = new_cvol.limit

  @cvos = new_cvol.cvos
end