Module: DarkSky
- Defined in:
- lib/darksky-api.rb,
lib/darksky-api/day.rb,
lib/darksky-api/config.rb,
lib/darksky-api/current.rb,
lib/darksky-api/version.rb,
lib/darksky-api/location.rb,
lib/darksky-api/common-methods.rb
Overview
Defined Under Namespace
Classes: CommonMethods, Location
Constant Summary collapse
- VERSION =
version of this library (follows SemVer for versions >= 1.0.0)
'0.1.6'.freeze
Class Method Summary collapse
-
.config(opts) ⇒ void
set required and optional class variables.
-
.key ⇒ String
API key that was set by
.config()
.
Class Method Details
.config(opts) ⇒ void
This method returns an undefined value.
set required and optional class variables
keyword arguments:
key
[required] ─ API key from DarkSky
9 10 11 12 13 14 15 16 |
# File 'lib/darksky-api/config.rb', line 9 def self.config(opts) defaults = { } opts = defaults.merge opts # required parameters @@key = opts.fetch(:key) end |
.key ⇒ String
Returns API key that was set by .config()
.
22 23 24 |
# File 'lib/darksky-api/config.rb', line 22 def self.key @@key end |