Class: Eson::Search::Filters::FilterArray

Inherits:
Array
  • Object
show all
Includes:
FilterMethods, Parametrized
Defined in:
lib/eson/search/filters.rb

Instance Attribute Summary

Attributes included from Parametrized

#args

Instance Method Summary collapse

Methods included from Parametrized

#initialize, #param

Instance Method Details

#define_filtersObject



16
17
18
# File 'lib/eson/search/filters.rb', line 16

def define_filters
  instance_exec(self, &Proc.new) if block_given?
end

#filtersObject



12
13
14
# File 'lib/eson/search/filters.rb', line 12

def filters
  self
end

#to_query_hashObject



20
21
22
23
24
25
26
# File 'lib/eson/search/filters.rb', line 20

def to_query_hash
  if length == 1
    first.to_query_hash
  else
    map(&:to_query_hash)
  end
end