Module: Elasticsearch::DSL::Search::BaseCompoundFilterComponent::MethodDelegation
- Defined in:
- lib/elasticsearch/dsl/search/base_compound_filter_component.rb
Instance Method Summary collapse
-
#method_missing(name, *args, &block) ⇒ Object
Looks up the corresponding class for a method being invoked, and initializes it.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
Looks up the corresponding class for a method being invoked, and initializes it
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/elasticsearch/dsl/search/base_compound_filter_component.rb', line 102 def method_missing(name, *args, &block) klass = Utils.__camelize(name) if Filters.const_defined? klass @value << Filters.const_get(klass).new(*args, &block) elsif @block @block.binding.eval('self').send(name, *args, &block) else super end end |