module Inazuma

Constants

VERSION

Public Class Methods

config() click to toggle source

Global settings for Inazuma

# File lib/inazuma/config.rb, line 13
def self.config
  @config
end
configure() { |config ||= configuration| ... } click to toggle source

Configures global settings for Inazuma

Inazuma.configure do |config|
  config.default_per_page = 10
end
# File lib/inazuma/config.rb, line 8
def self.configure(&block)
  yield @config ||= Inazuma::Configuration.new
end
paginate_array(array, options = {}) click to toggle source

Wrap an Array object to make it paginatable

Options

  • :limit - limit

  • :offset - offset

  • :total_count - total_count

# File lib/inazuma/paginatable_array.rb, line 55
def self.paginate_array(array, options = {})
  PaginatableArray.new array, options
end