Module: APIClientBase::Client

Extended by:
ActiveSupport::Concern
Defined in:
lib/api_client_base/client.rb,
lib/api_client_base/client/class_methods.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.module(opts = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/api_client_base/client.rb', line 4

def self.module(opts={})
  mod = Module.new do
    mattr_accessor :api_client_base_client_options

    def self.included(base)
      base.class_attribute :api_client_base_client_options
      base.api_client_base_client_options = self.api_client_base_client_options
      base.send :include, APIClientBase::Client
    end
  end

  mod.api_client_base_client_options = opts

  mod
end