Object
Wraps a "page number" and provides some utility methods
# File lib/kaminari/helpers/paginator.rb, line 161 def +(other) to_i + other.to_i end
# File lib/kaminari/helpers/paginator.rb, line 165 def -(other) to_i - other.to_i end
# File lib/kaminari/helpers/paginator.rb, line 169 def <=>(other) to_i <=> other.to_i end
current page or not
# File lib/kaminari/helpers/paginator.rb, line 109 def current? @page == @options[:current_page] end
the first page or not
# File lib/kaminari/helpers/paginator.rb, line 114 def first? @page == 1 end
inside the inner window or not
# File lib/kaminari/helpers/paginator.rb, line 144 def inside_window? (@options[:current_page] - @page).abs <= @options[:window] end
the last page or not
# File lib/kaminari/helpers/paginator.rb, line 119 def last? @page == @options[:total_pages] end
within the left outer window or not
# File lib/kaminari/helpers/paginator.rb, line 134 def left_outer? @page <= @options[:left] end
the next page or not
# File lib/kaminari/helpers/paginator.rb, line 129 def next? @page == @options[:current_page] + 1 end
the page number
# File lib/kaminari/helpers/paginator.rb, line 104 def number @page end
the previous page or not
# File lib/kaminari/helpers/paginator.rb, line 124 def prev? @page == @options[:current_page] - 1 end
within the right outer window or not
# File lib/kaminari/helpers/paginator.rb, line 139 def right_outer? @options[:total_pages] - @page < @options[:right] end
# File lib/kaminari/helpers/paginator.rb, line 153 def to_i number end
Generated with the Darkfish Rdoc Generator 2.