Sha256: de5693ef6c16c798d9ca01ddd150e5c32430931aabe1f3759800337513b89957

Contents?: true

Size: 205 Bytes

Versions: 4

Compression:

Stored size: 205 Bytes

Contents

module Jets::Util
  module Truthy
    # Allows use non-truthy values like
    #   n no false off null nil 0
    def truthy?(value)
      %w[y yes true on 1].include?(value.to_s.downcase)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jets-6.0.5 lib/jets/util/truthy.rb
jets-6.0.4 lib/jets/util/truthy.rb
jets-6.0.3 lib/jets/util/truthy.rb
jets-6.0.2 lib/jets/util/truthy.rb