File: truthy.rb

package info (click to toggle)
ruby-clamp 1.1.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 312 kB
  • sloc: ruby: 2,359; makefile: 4
file content (9 lines) | stat: -rw-r--r-- 146 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
module Clamp

  TRUTHY_VALUES = %w(1 yes enable on true).freeze

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

end