module DarkSky
@author Jacob Pratt <the.z.cuber@gmail.com> @version 0.1.6
Constants
- VERSION
version of this library (follows SemVer for versions >= 1.0.0)
Public Class Methods
config(opts)
click to toggle source
set required and optional class variables
keyword arguments:
-
**`key`** [required] ─ API key from [DarkSky](darksky.net/dev/account)
@since 0.1.0 @return [void]
# 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()
click to toggle source
@example
DarkSky.key #=> '0f1e2d3c4b5a6978'
@since 0.1.0 @return [String] API key that was set by `.config()`
# File lib/darksky-api/config.rb, line 22 def self.key @@key end