Sha256: 5438604e57eb06cd7e4db9e261ac5939fbf2d36a0a38b6d198ba56834f1067d3
Contents?: true
Size: 244 Bytes
Versions: 25
Compression:
Stored size: 244 Bytes
Contents
class String def to_b return true if self == true || self =~ (/(true|t|yes|y|1)$/i) return false if self == false || blank? || self =~ (/(false|f|no|n|0)$/i) raise ArgumentError, "invalid value for Boolean: \"#{self}\"" end end
Version data entries
25 entries across 25 versions & 1 rubygems