Module: Datalab::ModuleMethods
- Included in:
- Datalab
- Defined in:
- lib/datalab/module_methods.rb
Constant Summary collapse
- DEFAULT_CONNECTION =
Faraday.new do | builder | builder.request :multipart builder.request :url_encoded builder.adapter Faraday.default_adapter end
Instance Method Summary collapse
Instance Method Details
#api_key(api_key = nil) ⇒ Object
13 14 15 16 |
# File 'lib/datalab/module_methods.rb', line 13 def api_key( api_key = nil ) @api_key = api_key || @api_key @api_key end |
#connection(connection = nil) ⇒ Object
9 10 11 |
# File 'lib/datalab/module_methods.rb', line 9 def connection( connection = nil ) @connection = connection || @connection || DEFAULT_CONNECTION end |