Class: Yt::Models::Configuration
- Inherits:
-
Object
- Object
- Yt::Models::Configuration
- Defined in:
- lib/yt/models/configuration.rb
Overview
Stores runtime configuration information.
Configuration options are loaded from ‘~/.yt`, `.yt`, command line switches, and the `YT_OPTS` environment variable (listed in lowest to highest precedence).
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
25 26 27 28 29 |
# File 'lib/yt/models/configuration.rb', line 25 def initialize @client_id = ENV['YT_CLIENT_ID'] @client_secret = ENV['YT_CLIENT_SECRET'] @api_key = ENV['YT_API_KEY'] end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
23 24 25 |
# File 'lib/yt/models/configuration.rb', line 23 def api_key @api_key end |
#client_id ⇒ Object
Returns the value of attribute client_id.
23 24 25 |
# File 'lib/yt/models/configuration.rb', line 23 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
23 24 25 |
# File 'lib/yt/models/configuration.rb', line 23 def client_secret @client_secret end |