Sha256: a299f2f4072a1fe36d82ca65f8b07ca5e8e141ed476860ac61a1e514a95a9873

Contents?: true

Size: 690 Bytes

Versions: 1

Compression:

Stored size: 690 Bytes

Contents

require 'active_support/configurable'

module ApiPaginationHeaders
  # Configures global settings for ApiPaginationHeaders
  #   ApiPaginationHeaders.configure do |config|
  #     config.total_count_header = 'X-Total-Count'
  #   end
  def self.configure(&block)
    yield @config ||= ApiPaginationHeaders::Configuration.new
  end

  # Global settings for ApiPaginationHeaders
  def self.config
    @config ||= ApiPaginationHeaders::Configuration.new
  end

  class Configuration #:nodoc:
    include ActiveSupport::Configurable

    TOTAL_COUNT_HEADER = 'Total-Count'

    config_accessor(:total_count_header)  { TOTAL_COUNT_HEADER }
    config_accessor(:force_https)  { false }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
api_pagination_headers-2.1.0 lib/api_pagination_headers/config.rb