Class: Google::Config
- Inherits:
-
Object
- Object
- Google::Config
- Defined in:
- lib/google/config.rb
Overview
Wrapper to access settings. Unless you specify additional settings in your config file, you should never have to call settings on your own!
Initialisation
Google::Config.file = File.join(File.dirname(__FILE__), "google.yml")
Example
account: [email protected]
worksheet_token: session_token_for_worksheets
list_token: session_token_for_lists
Class Method Summary collapse
Class Method Details
.file=(path) ⇒ Object
19 20 21 |
# File 'lib/google/config.rb', line 19 def self.file=(path) @@file = path end |
.setting(name) ⇒ Object
23 24 25 26 |
# File 'lib/google/config.rb', line 23 def self.setting(name) @@yaml ||= YAML.load_file(@@file) @@yaml[name] end |