Class: Coincap::Configuration
- Inherits:
-
Object
- Object
- Coincap::Configuration
- Defined in:
- lib/coincap.rb
Overview
Configuration class for Coincap
Instance Attribute Summary collapse
-
#accept_encoding ⇒ String
The accept encoding to use for all requests.
-
#api_key ⇒ String
The API key to use for all requests.
Instance Method Summary collapse
-
#initialize(api_key = nil, accept_encoding = 'gzip') ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(api_key = nil, accept_encoding = 'gzip') ⇒ Configuration
Returns a new instance of Configuration.
30 31 32 33 |
# File 'lib/coincap.rb', line 30 def initialize(api_key = nil, accept_encoding = 'gzip') @api_key = api_key @accept_encoding = accept_encoding end |
Instance Attribute Details
#accept_encoding ⇒ String
Returns The accept encoding to use for all requests. Select ‘gzip’ or ‘deflate’. Defaults to ‘gzip’.
28 29 30 |
# File 'lib/coincap.rb', line 28 def accept_encoding @accept_encoding end |
#api_key ⇒ String
Returns The API key to use for all requests.
26 27 28 |
# File 'lib/coincap.rb', line 26 def api_key @api_key end |