Class: Yummly::Configuration
- Inherits:
-
Object
- Object
- Yummly::Configuration
- Defined in:
- lib/yummly/configuration.rb
Overview
Configuration class that stores configuration options for the Yummly API.
Yummly requires an App ID and APP key combination to authenticate against its API. At the very least these must be supplied in the configuration.
Additionally for certain paid plans Yummly offers SSL API access, so setting the configuration option use_ssl to true will send all API calls over HTTPS. This options defaults to false.
Configuration options are typically set via the Yummly.config method.
Instance Attribute Summary collapse
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#app_key ⇒ Object
Returns the value of attribute app_key.
-
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Creates a configuration object, defaulting use_ssl to false.
-
#use_ssl? ⇒ Boolean
Returns true if API calls to Yummly should use SSL.
Constructor Details
#initialize ⇒ Configuration
Creates a configuration object, defaulting use_ssl to false.
23 24 25 |
# File 'lib/yummly/configuration.rb', line 23 def initialize @use_ssl = false end |
Instance Attribute Details
#app_id ⇒ Object
Returns the value of attribute app_id.
18 19 20 |
# File 'lib/yummly/configuration.rb', line 18 def app_id @app_id end |
#app_key ⇒ Object
Returns the value of attribute app_key.
18 19 20 |
# File 'lib/yummly/configuration.rb', line 18 def app_key @app_key end |
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
18 19 20 |
# File 'lib/yummly/configuration.rb', line 18 def use_ssl @use_ssl end |
Instance Method Details
#use_ssl? ⇒ Boolean
Returns true if API calls to Yummly should use SSL.
32 33 34 |
# File 'lib/yummly/configuration.rb', line 32 def use_ssl? use_ssl end |