Class: Chewy::Search::Parameters::AllowPartialSearchResults

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

Overview

Stores boolean value, but has 3 states: true, false and nil.

Instance Attribute Summary

Attributes inherited from Storage

#value

Instance Method Summary collapse

Methods inherited from Storage

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

Constructor Details

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

Instance Method Details

#render{Symbol => Object}?

We don't want to render nil, but render true and false values.

Returns:

See Also:



15
16
17
# File 'lib/chewy/search/parameters/allow_partial_search_results.rb', line 15

def render
  {self.class.param_name => value} unless value.nil?
end