Module: Stn::Config
- Included in:
- Stn
- Defined in:
- lib/stn/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 ⇒ Stn::Models::Configuration
Returns the global Models::Configuration object.
-
#configure {|Stn::Models::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
Instance Method Details
#configuration ⇒ Stn::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 Stn.configure}.
37 38 39 |
# File 'lib/stn/config.rb', line 37 def configuration @configuration ||= Stn::Configuration.new end |
#configure {|Stn::Models::Configuration| ... } ⇒ Object
Yields the global configuration to the given block.
24 25 26 |
# File 'lib/stn/config.rb', line 24 def configure yield configuration if block_given? end |