Class: MetaNexus::Config
- Inherits:
-
Object
- Object
- MetaNexus::Config
- Defined in:
- lib/meta_nexus/config.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
-
#initialize(region = 'eu', locale = 'en_GB') ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(region = 'eu', locale = 'en_GB') ⇒ Config
Returns a new instance of Config.
4 5 6 7 8 |
# File 'lib/meta_nexus/config.rb', line 4 def initialize(region = 'eu', locale = 'en_GB') @api_key ||= ENV['BNET_API_KEY'] @region ||= region @locale ||= locale end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
2 3 4 |
# File 'lib/meta_nexus/config.rb', line 2 def api_key @api_key end |
#locale ⇒ Object
Returns the value of attribute locale.
2 3 4 |
# File 'lib/meta_nexus/config.rb', line 2 def locale @locale end |
#region ⇒ Object
Returns the value of attribute region.
2 3 4 |
# File 'lib/meta_nexus/config.rb', line 2 def region @region end |