Sha256: 115c6f44622d8cc42d8e4449eda9c2b4cd5bff685bc8a53b583270605ee6ea2d

Contents?: true

Size: 640 Bytes

Versions: 26

Compression:

Stored size: 640 Bytes

Contents

module Administrador
  module Configuration
    def configure
      yield self
    end

    mattr_accessor(:engines) { {} }
    mattr_accessor(:features) { {} }
    mattr_accessor(:resource_label_methods) { [:human, :name, :email, :to_s] }
    mattr_accessor(:base_controller_class_name) { '::ApplicationController' }

    def register_engine(name, options = {})
      @@engines[name] = Administrador::RegisteredEngine.new(name, options)
    end

    def enable_feature(name, options = {})
      @@features[name] = Administrador::Feature.new(name, options)
    end

    def features?(name)
      @@features.has_key?(name)
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
administrador-0.0.28.pre lib/administrador/configuration.rb
administrador-0.0.27.pre lib/administrador/configuration.rb
administrador-0.0.26.pre lib/administrador/configuration.rb
administrador-0.0.25.pre lib/administrador/configuration.rb
administrador-0.0.24.pre lib/administrador/configuration.rb
administrador-0.0.22.pre lib/administrador/configuration.rb
administrador-0.0.21.pre lib/administrador/configuration.rb
administrador-0.0.20.pre lib/administrador/configuration.rb
administrador-0.0.18.pre lib/administrador/configuration.rb
administrador-0.0.17.pre lib/administrador/configuration.rb
administrador-0.0.16.pre lib/administrador/configuration.rb
administrador-0.0.15.pre lib/administrador/configuration.rb
administrador-0.0.14.pre lib/administrador/configuration.rb
administrador-0.0.13.pre lib/administrador/configuration.rb
administrador-0.0.12.pre lib/administrador/configuration.rb
administrador-0.0.11.pre lib/administrador/configuration.rb
administrador-0.0.10.pre lib/administrador/configuration.rb
administrador-0.0.9.pre lib/administrador/configuration.rb
administrador-0.0.8.pre lib/administrador/configuration.rb
administrador-0.0.7.pre lib/administrador/configuration.rb