Module: ConfigNewton::ClassMethods
- Defined in:
- lib/config_newton.rb
Instance Method Summary collapse
-
#config(*args) ⇒ Object
Retrieve the configuration object or pass arguments identical to #configurable to add a new configuration property.
-
#configurables ⇒ Object
A list of configurable properties.
-
#configuration ⇒ Object
The configuration object.
-
#configure(options = {}, &block) ⇒ Object
Configure the class either with a hash or by providing a block.
Instance Method Details
#config(*args) ⇒ Object
Retrieve the configuration object or pass arguments identical to #configurable to add a new configuration property.
30 31 32 |
# File 'lib/config_newton.rb', line 30 def config(*args) args.any?? self.configurable(*args) : configuration end |
#configurables ⇒ Object
A list of configurable properties.
18 19 20 |
# File 'lib/config_newton.rb', line 18 def configurables configuration.properties end |
#configuration ⇒ Object
The configuration object.
23 24 25 |
# File 'lib/config_newton.rb', line 23 def configuration @configuration end |
#configure(options = {}, &block) ⇒ Object
Configure the class either with a hash or by providing a block. See the documentation for Configuration#set.
13 14 15 |
# File 'lib/config_newton.rb', line 13 def configure( = {}, &block) config.set(, &block) end |