Module: Natour::BooleanUtils

Defined in:
lib/natour/utils/boolean_utils.rb

Class Method Summary collapse

Class Method Details

.to_boolean(value, default_value: false) ⇒ Object



5
6
7
8
9
# File 'lib/natour/utils/boolean_utils.rb', line 5

def to_boolean(value, default_value: false)
  return !!value unless value.nil?

  !!default_value
end