class Her::PaginatedCollection
Public Instance Methods
current_page()
click to toggle source
# File lib/her/paginated_collection.rb, line 3 def current_page metadata[:current_page].to_i end
per_page()
click to toggle source
# File lib/her/paginated_collection.rb, line 7 def per_page metadata[:per_page].to_i end
total_entries()
click to toggle source
# File lib/her/paginated_collection.rb, line 11 def total_entries metadata[:total_entries].to_i end
total_pages()
click to toggle source
# File lib/her/paginated_collection.rb, line 15 def total_pages return 0 if total_entries == 0 || per_page == 0 (total_entries.to_f / per_page).ceil end