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.
29 30 31 32 |
# File 'lib/coincap.rb', line 29 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’.
27 28 29 |
# File 'lib/coincap.rb', line 27 def accept_encoding @accept_encoding end |
#api_key ⇒ String
Returns The API key to use for all requests.
25 26 27 |
# File 'lib/coincap.rb', line 25 def api_key @api_key end |