Class: SqlcachedClient::ArelWrapper

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/sqlcached_client/arel.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeArelWrapper

Returns a new instance of ArelWrapper.



55
56
57
58
59
60
# File 'lib/sqlcached_client/arel.rb', line 55

def initialize
  @arel_module = ::Arel.clone
  arel_module.const_set(:Table, ::Arel::Table.clone)
  arel_module::Table.engine = DummyConnection.establish_connection(
    adapter: :nulldb)
end

Instance Attribute Details

#arel_moduleObject (readonly)

Returns the value of attribute arel_module.



53
54
55
# File 'lib/sqlcached_client/arel.rb', line 53

def arel_module
  @arel_module
end

Class Method Details

.arel_moduleObject



63
64
65
# File 'lib/sqlcached_client/arel.rb', line 63

def arel_module
  instance.arel_module
end