Class: Eson::Search::Facets::FacetArray
- Inherits:
-
Array
- Object
- Array
- Eson::Search::Facets::FacetArray
- Includes:
- Parametrized
- Defined in:
- lib/eson/search/facets.rb
Instance Attribute Summary
Attributes included from Parametrized
Instance Method Summary collapse
-
#initialize(args) ⇒ FacetArray
constructor
A new instance of FacetArray.
- #to_query_hash ⇒ Object
Methods included from Parametrized
Constructor Details
#initialize(args) ⇒ FacetArray
Returns a new instance of FacetArray.
7 8 9 10 |
# File 'lib/eson/search/facets.rb', line 7 def initialize(args) self.args = args instance_exec(self, &Proc.new) if block_given? end |
Instance Method Details
#to_query_hash ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/eson/search/facets.rb', line 12 def to_query_hash h = {} self.each do |k,v| h[k] = v.to_query_hash h[k][:scope] = v.scope_name if v.scope_name end h end |