class Kaminari::Helpers::Paginator::PageProxy
Wraps a “page number” and provides some utility methods
Public Instance Methods
current?()
click to toggle source
current page or not
# File lib/kaminari/helpers/tags.rb, line 126 def current? @page == @options[:current_page] end
first?()
click to toggle source
the first page or not
# File lib/kaminari/helpers/tags.rb, line 131 def first? @page == 1 end
inside_window?()
click to toggle source
inside the inner window or not
# File lib/kaminari/helpers/tags.rb, line 151 def inside_window? (@page - @options[:current_page]).abs <= @options[:window] end
last?()
click to toggle source
the last page or not
# File lib/kaminari/helpers/tags.rb, line 136 def last? @page == @options[:num_pages] end
left_outer?()
click to toggle source
within the left outer window or not
# File lib/kaminari/helpers/tags.rb, line 141 def left_outer? @page <= @options[:left] + 1 end
number()
click to toggle source
the page number
# File lib/kaminari/helpers/tags.rb, line 121 def number @page end
right_outer?()
click to toggle source
within the right outer window or not
# File lib/kaminari/helpers/tags.rb, line 146 def right_outer? @options[:num_pages] - @page <= @options[:right] end
was_truncated?()
click to toggle source
The last rendered tag was “truncated” or not
# File lib/kaminari/helpers/tags.rb, line 156 def was_truncated? @last.is_a? TruncatedSpan end