Module: Vng::Config
- Included in:
- Vng
- Defined in:
- lib/vng/config.rb
Overview
Provides methods to read and write global configuration settings.
A typical usage is to set the Security Token for the API calls.
Instance Method Summary collapse
-
#configuration ⇒ Vng::Models::Configuration
Returns the global Models::Configuration object.
-
#configure {|Vng::Models::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
Instance Method Details
#configuration ⇒ Vng::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 Vng.configure}.
37 38 39 |
# File 'lib/vng/config.rb', line 37 def configuration @configuration ||= Vng::Configuration.new end |
#configure {|Vng::Models::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
24 25 26 |
# File 'lib/vng/config.rb', line 24 def configure yield configuration if block_given? end |