Sha256: e1839a3ab1b8e44659faad797c4be42135e4285d24afde6892006f4889c76b30

Contents?: true

Size: 185 Bytes

Versions: 5

Compression:

Stored size: 185 Bytes

Contents

module Natour
  module BooleanUtils
    module_function

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

      !!default_value
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
natour-0.12.0 lib/natour/utils/boolean_utils.rb
natour-0.11.0 lib/natour/utils/boolean_utils.rb
natour-0.10.0 lib/natour/utils/boolean_utils.rb
natour-0.9.0 lib/natour/utils/boolean_utils.rb
natour-0.8.0 lib/natour/utils/boolean_utils.rb