Sha256: 35873fce27dd5977f9bb587638ded3ae41ce994dc8bfbca0c6fed233dd8418f8

Contents?: true

Size: 146 Bytes

Versions: 6

Compression:

Stored size: 146 Bytes

Contents

module Clamp

  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

6 entries across 6 versions & 1 rubygems

Version Path
clamp-1.2.1 lib/clamp/truthy.rb
clamp-1.2.0 lib/clamp/truthy.rb
clamp-1.2.0.beta1 lib/clamp/truthy.rb
clamp-1.1.2 lib/clamp/truthy.rb
clamp-1.1.1 lib/clamp/truthy.rb
clamp-1.1.0 lib/clamp/truthy.rb