Class: Scholarsphere::Client::Config
- Inherits:
-
Object
- Object
- Scholarsphere::Client::Config
- Defined in:
- lib/scholarsphere/client/config.rb
Overview
Loads the yaml configuration file for the client. The default location is config/scholarsphere-client.yml and
the client will load this file automatically whenever it is invoked.
The configuration file should contain the endpoint of the Scholarsphere API and the API key.
Required
SS4_ENDPOINT: "https://scholarsphere.psu.edu/api/v1"
SS_CLIENT_KEY: "[key]"
Optional
SS_CLIENT_SSL: "false"
Instance Attribute Summary collapse
- #file ⇒ Pathname readonly
Instance Method Summary collapse
-
#initialize(file = Pathname.pwd.join('config', 'scholarsphere-client.yml')) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(file = Pathname.pwd.join('config', 'scholarsphere-client.yml')) ⇒ Config
Returns a new instance of Config.
31 32 33 34 |
# File 'lib/scholarsphere/client/config.rb', line 31 def initialize(file = Pathname.pwd.join('config', 'scholarsphere-client.yml')) @file = file load_config end |
Instance Attribute Details
#file ⇒ Pathname (readonly)
28 29 30 |
# File 'lib/scholarsphere/client/config.rb', line 28 def file @file end |