Sha256: 0ec4a91d2f3b38ecdb9781f3bb100545971e60d911e2a92148a8c82bde65d1df

Contents?: true

Size: 186 Bytes

Versions: 3

Compression:

Stored size: 186 Bytes

Contents

# frozen_string_literal: true

module Clamp #:nodoc:

  TRUTHY_VALUES = %w[1 yes enable on true].freeze

  def self.truthy?(arg)
    TRUTHY_VALUES.include?(arg.to_s.downcase)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
clamp-1.3.2 lib/clamp/truthy.rb
clamp-1.3.1 lib/clamp/truthy.rb
clamp-1.3.0 lib/clamp/truthy.rb