Module: Yt::Config
- Included in:
- Yt
- Defined in:
- lib/yt/config.rb
Overview
Provides methods to read and write global configuration settings.
A typical usage is to set the API keys retrieved from the Google Developers Console.
Note that Yt.configure has precedence over values through with environment variables (see Models::Configuration).
Instance Method Summary collapse
-
#configuration ⇒ Yt::Models::Configuration
Returns the global Models::Configuration object.
-
#configure {|Yt::Models::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
Instance Method Details
#configuration ⇒ Yt::Models::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 Yt.configure}.
45 46 47 |
# File 'lib/yt/config.rb', line 45 def configuration @configuration ||= Yt::Configuration.new end |
#configure {|Yt::Models::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
32 33 34 |
# File 'lib/yt/config.rb', line 32 def configure yield configuration if block_given? end |