Module: ShardedDatabase::AggregateProxy
- Defined in:
- lib/sharded_database/aggregate_proxy.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
26
27
28
|
# File 'lib/sharded_database/aggregate_proxy.rb', line 26
def method_missing(method, *args, &block)
load_target.respond_to?(method) ? load_target.send(method, *args, &block) : super
end
|
Instance Method Details
#===(other) ⇒ Object
4
5
6
|
# File 'lib/sharded_database/aggregate_proxy.rb', line 4
def ===(other)
other === load_target
end
|
8
9
10
|
# File 'lib/sharded_database/aggregate_proxy.rb', line 8
def inspect
load_target.inspect.gsub(/#<([\w\:]+)\s(.*?)>/) { "#<#{$1}(#{@klass.name}) #{$2}>" }
end
|
#respond_to?(method) ⇒ Boolean
12
13
14
|
# File 'lib/sharded_database/aggregate_proxy.rb', line 12
def respond_to?(method)
load_target.respond_to?(method) || super
end
|