Module: Chewy::Search::Parameters::BoolStorage

Included in:
Explain, None, Profile, TrackScores, TrackTotalHits, Version
Defined in:
lib/chewy/search/parameters/concerns/bool_storage.rb

Overview

Stores a boolean value. Any passed value is coerced to a boolean value.

Instance Method Summary collapse

Instance Method Details

#update!(other_value) ⇒ true, false

Performs values disjunction on update.

Parameters:

  • other_value (true, false, Object)

    any acceptable storage value

Returns:

  • (true, false)

    updated value

See Also:



12
13
14
# File 'lib/chewy/search/parameters/concerns/bool_storage.rb', line 12

def update!(other_value)
  replace!(value || normalize(other_value))
end