Module: Elegant::Config
- Included in:
- Elegant
- Defined in:
- lib/elegant/config.rb
Overview
Provides methods to read and write global configuration settings.
Instance Method Summary collapse
-
#configuration ⇒ Elegant::Configuration
Returns the global Models::Configuration object.
-
#configure {|Elegant::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
Instance Method Details
#configuration ⇒ Elegant::Configuration
Returns the global Models::Configuration object.
While this method can be used to read and write configuration settings, it is easier to use #configure Elegant.configure}.
33 34 35 |
# File 'lib/elegant/config.rb', line 33 def configuration @configuration ||= Elegant::Configuration.new end |
#configure {|Elegant::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
20 21 22 |
# File 'lib/elegant/config.rb', line 20 def configure yield configuration if block_given? end |