Method: EOD::API#initialize
- Defined in:
- lib/eod/api.rb
#initialize(api_token, use_cache: true, cache_dir: nil, cache_life: nil) ⇒ API
Returns a new instance of API.
11 12 13 14 15 16 |
# File 'lib/eod/api.rb', line 11 def initialize(api_token, use_cache: true, cache_dir: nil, cache_life: nil) @api_token = api_token cache.disable unless use_cache cache.dir = cache_dir if cache_dir cache.life = cache_life if cache_life end |