File: truthy.rb

package info (click to toggle)
ruby-clamp 1.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 364 kB
  • sloc: ruby: 2,851; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 187 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
# 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