Class: Eson::Search::Missing

Inherits:
Object
  • Object
show all
Includes:
Filter
Defined in:
lib/eson/search/missing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Filter

included, #method_missing

Constructor Details

#initialize(options = {}) ⇒ Missing

Returns a new instance of Missing.



11
12
13
# File 'lib/eson/search/missing.rb', line 11

def initialize(options = {})
  self.options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Eson::Search::Filter

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



9
10
11
# File 'lib/eson/search/missing.rb', line 9

def options
  @options
end

Instance Method Details

#missing { ... } ⇒ self

Generates a ‘missing` filter in a filter context.

Yields:

  • the block containing further options and subfilters

Returns:

  • (self)

    the generated facet



7
# File 'lib/eson/search/missing.rb', line 7

short_name :missing

#to_query_hashObject



15
16
17
# File 'lib/eson/search/missing.rb', line 15

def to_query_hash
  { name => options }
end