Class: ActiveShard::ActiveRecord::SchemaConnectionProxy
- Inherits:
-
Object
- Object
- ActiveShard::ActiveRecord::SchemaConnectionProxy
- Defined in:
- lib/active_shard/active_record/schema_connection_proxy.rb
Overview
SchemaConnectionProxy holds a Connection object and restricts messages passed to it. Only schema-ish messages are allowed.
Instance Method Summary collapse
- #cache ⇒ Object
-
#initialize(target) ⇒ SchemaConnectionProxy
constructor
A new instance of SchemaConnectionProxy.
- #method_missing(sym, *args, &block) ⇒ Object
Constructor Details
#initialize(target) ⇒ SchemaConnectionProxy
Returns a new instance of SchemaConnectionProxy.
23 24 25 |
# File 'lib/active_shard/active_record/schema_connection_proxy.rb', line 23 def initialize( target ) @target = target end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
31 32 33 |
# File 'lib/active_shard/active_record/schema_connection_proxy.rb', line 31 def method_missing( sym, *args, &block ) raise ::ActiveShard::NoActiveShardError end |
Instance Method Details
#cache ⇒ Object
27 28 29 |
# File 'lib/active_shard/active_record/schema_connection_proxy.rb', line 27 def cache yield end |