Module: Squid::Config
- Included in:
- Squid
- Defined in:
- lib/squid/config.rb
Overview
Provides methods to read and write global configuration settings.
A typical usage is to set the default dimensions and colors for charts.
Note that Squid.configure has precedence over values through with environment variables (see Configuration).
Instance Method Summary collapse
-
#configuration ⇒ Squid::Configuration
Returns the global Configuration object.
-
#configure {|Squid::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
Instance Method Details
#configuration ⇒ Squid::Configuration
Returns the global Squid::Configuration object.
While this method can be used to read and write configuration settings, it is easier to use #configure Squid.configure}.
38 39 40 |
# File 'lib/squid/config.rb', line 38 def configuration @configuration ||= Squid::Configuration.new end |
#configure {|Squid::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
25 26 27 |
# File 'lib/squid/config.rb', line 25 def configure yield configuration if block_given? end |