Sha256: bf5d0d018b0acb31cb9a44dcaada6f8983df83a319d901237fbf4cb87cf10180
Contents?: true
Size: 274 Bytes
Versions: 10
Compression:
Stored size: 274 Bytes
Contents
module ActiveMetadata::Helpers def to_bool str return true if str == true || str =~ (/(true|t|yes|y|1)$/i) return false if str == false || str.blank? || str =~ (/(false|f|no|n|0)$/i) raise ArgumentError.new("invalid value for Boolean: \"#{str}\"") end end
Version data entries
10 entries across 10 versions & 1 rubygems