Module: Linguo::Config
- Defined in:
- lib/linguo/config.rb
Overview
Defines methods to set API key.
Class Method Summary collapse
Class Method Details
.api_key ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/linguo/config.rb', line 8 def self.api_key begin @@api_key rescue NameError raise Linguo::Errors::MissingApiKey, "No API key has been set!" end end |
.api_key=(val) ⇒ Object
4 5 6 |
# File 'lib/linguo/config.rb', line 4 def self.api_key=(val) @@api_key = val end |