Module: Eson::Search::Facet
- Included in:
- FilterFacet, GeoDistance, Histogram, QueryFacet, Range, Statistical, Terms, TermsStats
- Defined in:
- lib/eson/search/facet.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#scope_name ⇒ Object
Returns the value of attribute scope_name.
Class Method Summary collapse
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, arg) ⇒ Object
38 39 40 41 |
# File 'lib/eson/search/facet.rb', line 38 def method_missing(name, arg) warn("#{name} called as a facet option") self.[name] = arg end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
22 23 24 |
# File 'lib/eson/search/facet.rb', line 22 def args @args end |
#scope_name ⇒ Object
Returns the value of attribute scope_name.
22 23 24 |
# File 'lib/eson/search/facet.rb', line 22 def scope_name @scope_name end |
Class Method Details
.included(base) ⇒ Object
16 17 18 19 20 |
# File 'lib/eson/search/facet.rb', line 16 def self.included(base) base.class_eval do extend ClassMethods end end |
Instance Method Details
#param(name) ⇒ Object
24 25 26 |
# File 'lib/eson/search/facet.rb', line 24 def param(name) args[name] || (raise "Parameter #{name} not given") end |