Class: Shift::Api::Core::Model

Inherits:
JsonApiClient::Resource
  • Object
show all
Defined in:
lib/shift/api/core/model.rb

Overview

The base class for all shift api models.

Defining a new model is as simple as extending this.

Class Method Summary collapse

Class Method Details

.reconfigure(config) ⇒ Object

Reconfigures the model and all subclasses this is generally called whenever the client is reconfigured on the fly such as in test and development environments.

Parameters:



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/shift/api/core/model.rb', line 18

def self.reconfigure(config)
  configure_site(config)
  configure_adapter(config)
  remove_connection_cache
  configure_error_handler
  configure_logger(config)
  configure_inspector(config)
  configure_timeout(config)
  configure_open_timeout(config)
  configure_headers(config)
  reconfigure_subclasses(config)
end