Sha256: bbc932e97ac40a0d248d1ecc7b7179b71b99a9af951f45cdbd9618b99b74c54c

Contents?: true

Size: 444 Bytes

Versions: 4

Compression:

Stored size: 444 Bytes

Contents

# see https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/config.rb
module Adhoq
  class Configuration
    include ActiveSupport::Configurable

    config_accessor :storage

    config_accessor :authorization
    config_accessor :authorization_failure_action

    config_accessor :current_user

    def callablize(name)
      if (c = config[name]).respond_to?(:call)
        c
      else
        c.to_proc
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adhoq-0.0.5 lib/adhoq/configuration.rb
adhoq-0.0.4 lib/adhoq/configuration.rb
adhoq-0.0.3 lib/adhoq/configuration.rb
adhoq-0.0.2 lib/adhoq/configuration.rb