Class: Switchman::SchemaCache
- Inherits:
-
ActiveRecord::ConnectionAdapters::SchemaCache
- Object
- ActiveRecord::ConnectionAdapters::SchemaCache
- Switchman::SchemaCache
- Defined in:
- lib/switchman/schema_cache.rb
Instance Attribute Summary collapse
-
#pool ⇒ Object
readonly
Returns the value of attribute pool.
Instance Method Summary collapse
- #copy_values(other_cache) ⇒ Object
-
#initialize(pool) ⇒ SchemaCache
constructor
A new instance of SchemaCache.
Constructor Details
#initialize(pool) ⇒ SchemaCache
Returns a new instance of SchemaCache.
6 7 8 9 |
# File 'lib/switchman/schema_cache.rb', line 6 def initialize(pool) @pool = pool super(nil) end |
Instance Attribute Details
#pool ⇒ Object (readonly)
Returns the value of attribute pool.
4 5 6 |
# File 'lib/switchman/schema_cache.rb', line 4 def pool @pool end |
Instance Method Details
#copy_values(other_cache) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/switchman/schema_cache.rb', line 11 def copy_values(other_cache) # use the same cached values but still fall back to the correct pool [:@columns, :@columns_hash, :@primary_keys, :@data_sources].each do |iv| instance_variable_set(iv, other_cache.instance_variable_get(iv)) end end |