Module: Feta::CommonClient

Defined in:
lib/feta/common_client.rb

Overview

This module allows the [Feature] and other classes to offer an ActiveRecord like query API by allowing to set a default [Client] to make operations.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.common_clientObject



36
37
38
# File 'lib/feta/common_client.rb', line 36

def self.common_client
  @common_client || (raise "No common client set")
end

.common_client=(client) ⇒ Object



32
33
34
# File 'lib/feta/common_client.rb', line 32

def self.common_client=(client)
  @common_client = client
end

Instance Method Details

#common_clientObject



40
41
42
# File 'lib/feta/common_client.rb', line 40

def common_client
  CommonClient.common_client
end