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