Sha256: 07d99aa5db663f70d599548387ba98dd03de8551e8a134be8278080130fdd3b6

Contents?: true

Size: 471 Bytes

Versions: 7

Compression:

Stored size: 471 Bytes

Contents

module Tanker
  module Configuration
    def configuration
      @@configuration || raise(NotConfigured, "Please configure Tanker. Set Tanker.configuration = {:url => ''}")
    end

    def configuration=(new_configuration)
      # the default pagination backend is WillPaginate
      @@configuration = new_configuration.tap do |_config|
        _config.replace({ :pagination_backend => :will_paginate }.merge(_config)) if _config.is_a?(Hash)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tanker-1.1.6 lib/tanker/configuration.rb
tanker-1.1.5 lib/tanker/configuration.rb
tanker-1.1.4 lib/tanker/configuration.rb
tanker-1.1.3 lib/tanker/configuration.rb
tanker-1.1.2 lib/tanker/configuration.rb
tanker-1.1.1 lib/tanker/configuration.rb
tanker-1.1.0 lib/tanker/configuration.rb