Module: Configurator
- Defined in:
- lib/configurator/configurator.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Classes: ConfigProxy
Class Method Summary
collapse
Class Method Details
.[](*keys) ⇒ Object
4
5
6
7
|
# File 'lib/configurator/configurator.rb', line 4
def self.[](*keys)
self.config ||= ConfigProxy.new(:class, self)
self.config[*keys]
end
|
.[]=(*keys) ⇒ Object
9
10
11
12
13
|
# File 'lib/configurator/configurator.rb', line 9
def self.[]=(*keys)
self.config ||= ConfigProxy.new(:class, self)
value = *keys.pop
self.config[*keys] = value
end
|
.from_hash(hsh) ⇒ Object
15
16
17
18
19
|
# File 'lib/configurator/configurator.rb', line 15
def self.from_hash(hsh)
self.config ||= ConfigProxy.new(:class, self)
self.config.from_hash(hsh)
self.config
end
|
.included(receiver) ⇒ Object
140
141
142
143
|
# File 'lib/configurator/configurator.rb', line 140
def self.included(receiver)
receiver.extend ClassMethods
receiver.send :include, InstanceMethods
end
|