1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

Reduce ivar

This commit is contained in:
Akira Matsuda 2022-04-23 07:46:44 +09:00
parent 794724e5f4
commit 2e73123c58

View file

@ -88,12 +88,13 @@ module Kaminari
include Comparable
def initialize(options, page, last) #:nodoc:
@options, @page, @last = options, page, last
@options, @page = options, page
@current_page = @options[:current_page]
@total_pages = @options[:total_pages]
@left = @options[:left]
@right = @options[:right]
@window = @options[:window]
@was_truncated = last.is_a? Gap
end
# the page number
@ -163,7 +164,7 @@ module Kaminari
# The last rendered tag was "truncated" or not
def was_truncated?
@last.is_a? Gap
@was_truncated
end
#Should we display the link tag?