Class: Elasticity::Search::ActiveRecordProxy::Relation
- Inherits:
-
ActiveSupport::ProxyObject
- Object
- ActiveSupport::ProxyObject
- Elasticity::Search::ActiveRecordProxy::Relation
show all
- Defined in:
- lib/elasticity/search.rb
Instance Method Summary
collapse
Constructor Details
#initialize(relation) ⇒ Relation
Returns a new instance of Relation.
229
230
231
|
# File 'lib/elasticity/search.rb', line 229
def initialize(relation)
@relation = relation
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
233
234
235
|
# File 'lib/elasticity/search.rb', line 233
def method_missing(name, *args, &block)
@relation.public_send(name, *args, &block)
end
|
Instance Method Details
#inspect ⇒ Object
243
244
245
|
# File 'lib/elasticity/search.rb', line 243
def inspect
"#<#{self.class}: #{@relation.to_sql}>"
end
|
#pretty_print(pp) ⇒ Object
237
238
239
240
241
|
# File 'lib/elasticity/search.rb', line 237
def pretty_print(pp)
pp.object_group(self) do
pp.text " #{@relation.to_sql}"
end
end
|