lib/comicvine/list.rb in comicvine-0.1.3 vs lib/comicvine/list.rb in comicvine-0.1.4
- old
+ new
@@ -28,11 +28,11 @@
end
# Returns the current page the object is on
# @return [Integer]
def page
- (@offset / @limit) + 1
+ (self.offset / self.limit) + 1
end
# Returns the total number of pages available
# @return [Integer] Total number of pages
# @since 0.1.3
@@ -49,11 +49,11 @@
protected
def update_ivals(new_cvol)
@total_count = new_cvol.total_count
- @offset = new_cvol.offset
- @limit = new_cvol.limit
+ @offset = new_cvol.offset || 0
+ @limit = new_cvol.limit || 0
@cvos = new_cvol.cvos
end
end
\ No newline at end of file