Class: ActiveShard::ActiveRecord::ConnectionProxyPool
- Inherits:
-
ActiveRecord::ConnectionAdapters::ConnectionPool
- Object
- ActiveRecord::ConnectionAdapters::ConnectionPool
- ActiveShard::ActiveRecord::ConnectionProxyPool
- Defined in:
- lib/active_shard/active_record/connection_proxy_pool.rb
Overview
ConnectionPool designed to return connection proxies of configurable types
Instance Attribute Summary collapse
-
#shard_definition ⇒ Object
readonly
Returns the value of attribute shard_definition.
Instance Method Summary collapse
-
#initialize(definition, options = {}) ⇒ ConnectionProxyPool
constructor
A new instance of ConnectionProxyPool.
Constructor Details
#initialize(definition, options = {}) ⇒ ConnectionProxyPool
Returns a new instance of ConnectionProxyPool.
19 20 21 22 23 24 |
# File 'lib/active_shard/active_record/connection_proxy_pool.rb', line 19 def initialize( definition, ={} ) super( ConnectionSpecificationAdapter.new( definition ) ) @shard_definition = definition @proxy_class = [:proxy_class] end |
Instance Attribute Details
#shard_definition ⇒ Object (readonly)
Returns the value of attribute shard_definition.
13 14 15 |
# File 'lib/active_shard/active_record/connection_proxy_pool.rb', line 13 def shard_definition @shard_definition end |