Class: Chewy::Search::Parameters::None

Inherits:
Storage
  • Object
show all
Includes:
BoolStorage
Defined in:
lib/chewy/search/parameters/none.rb

Overview

Just a standard boolean storage, except the rendering logic.

Instance Attribute Summary

Attributes inherited from Storage

#value

Instance Method Summary collapse

Methods included from BoolStorage

#update!

Methods inherited from Storage

#==, #initialize, #merge!, #replace!, #update!

Constructor Details

This class inherits a constructor from Chewy::Search::Parameters::Storage

Instance Method Details

#renderObject

Renders match_none query if the values is set to true.



19
20
21
# File 'lib/chewy/search/parameters/none.rb', line 19

def render
  {query: {match_none: {}}} if value.present?
end