Module: Administrador::Configuration

Included in:
Administrador
Defined in:
lib/administrador/configuration.rb

Instance Method Summary collapse

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



3
4
5
# File 'lib/administrador/configuration.rb', line 3

def configure
  yield self
end

#enable_feature(name, options = {}) ⇒ Object



16
17
18
# File 'lib/administrador/configuration.rb', line 16

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

#features?(name) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/administrador/configuration.rb', line 20

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

#register_engine(name, options = {}) ⇒ Object



12
13
14
# File 'lib/administrador/configuration.rb', line 12

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