Sha256: 886d1ed2db9527655c663d53c743d0975925536b4bc0064f0a6e6f7b9d8b49c5
Contents?: true
Size: 192 Bytes
Versions: 4
Compression:
Stored size: 192 Bytes
Contents
class String def to_bool return true if self =~ (/^(yes|y)$/i) return false if self =~ (/^(no|n)$/i) raise ArgumentError.new("invalid value for Boolean: \"#{self}\"") end end
Version data entries
4 entries across 4 versions & 1 rubygems