module Chewy::Search::Parameters::BoolStorage
Stores a boolean value. Any passed value is coerced to a boolean value.
Public Instance Methods
update!(other_value)
click to toggle source
Performs values disjunction on update.
@see Chewy::Search::Parameters::Storage#update!
@param other_value [true, false, Object] any acceptable storage value @return [true, false] updated value
# File lib/chewy/search/parameters/concerns/bool_storage.rb, line 12 def update!(other_value) replace!(value || normalize(other_value)) end
Private Instance Methods
normalize(value)
click to toggle source
# File lib/chewy/search/parameters/concerns/bool_storage.rb, line 18 def normalize(value) !!value end