Module: ElasticRecord::Relation::Delegation
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'lib/elastic_record/relation/delegation.rb', line 17
def method_missing(method, *args, &block)
if Array.method_defined?(method)
to_a.send(method, *args, &block)
elsif klass.respond_to?(method)
scoping { klass.send(method, *args, &block) }
else
super
end
end
|
Instance Method Details
#include?(obj) ⇒ Boolean
8
9
10
|
# File 'lib/elastic_record/relation/delegation.rb', line 8
def include?(obj)
to_a.include?(obj)
end
|
#to_ary ⇒ Object
4
5
6
|
# File 'lib/elastic_record/relation/delegation.rb', line 4
def to_ary
to_a.to_ary
end
|