Class: Enigma::Client
- Inherits:
-
Object
- Object
- Enigma::Client
- Defined in:
- lib/enigma/client.rb
Overview
Connects to the Enigma api at app.enigma.io/api.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Client
constructor
Creates a new client connection.
Constructor Details
#initialize(opts = {}) ⇒ Client
Creates a new client connection
The api key Defaults to the ENIGMA_KEY environment variable
13 14 15 16 |
# File 'lib/enigma/client.rb', line 13 def initialize(opts = {}) Enigma.key = ENV['ENIGMA_KEY'] || opts[:key] fail ArgumentError, 'API key is required' unless Enigma.key end |