Method: APIClientBase::Response.module

Defined in:
lib/api_client_base/response.rb

.module(opts = {}) ⇒ Object



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

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

    def self.included(base)
      base.class_attribute :api_client_base_response_options
      base.api_client_base_response_options =
        self.api_client_base_response_options
      base.send :include, APIClientBase::Response
    end
  end

  mod.api_client_base_response_options = opts

  mod
end