Class: Configuration
- Inherits:
-
Object
- Object
- Configuration
- Defined in:
- lib/stormglass/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#source ⇒ Object
Returns the value of attribute source.
-
#units ⇒ Object
Returns the value of attribute units.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
4 5 6 7 8 |
# File 'lib/stormglass/configuration.rb', line 4 def initialize @units = {} @api_key = ENV['STORMGLASS_API_KEY'] @source = 'sg' end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
2 3 4 |
# File 'lib/stormglass/configuration.rb', line 2 def api_key @api_key end |
#source ⇒ Object
Returns the value of attribute source.
2 3 4 |
# File 'lib/stormglass/configuration.rb', line 2 def source @source end |
#units ⇒ Object
Returns the value of attribute units.
2 3 4 |
# File 'lib/stormglass/configuration.rb', line 2 def units @units end |