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.
191
192
193
|
# File 'lib/elasticity/search.rb', line 191
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
195
196
197
|
# File 'lib/elasticity/search.rb', line 195
def method_missing(name, *args, &block)
@relation.public_send(name, *args, &block)
end
|
Instance Method Details
#inspect ⇒ Object
205
206
207
|
# File 'lib/elasticity/search.rb', line 205
def inspect
"#<#{self.class}: #{@relation.to_sql}>"
end
|
#pretty_print(pp) ⇒ Object
199
200
201
202
203
|
# File 'lib/elasticity/search.rb', line 199
def pretty_print(pp)
pp.object_group(self) do
pp.text " #{@relation.to_sql}"
end
end
|