Sha256: d57a7fa1dd686297d1b2d060218ce7479c9648d3e7a5f4fee84b116424afc51a
Contents?: true
Size: 221 Bytes
Versions: 4
Compression:
Stored size: 221 Bytes
Contents
module Microscope module Utils # Convert a value to its boolean representation def self.value_to_boolean(value) ![nil, false, 0, '0', 'f', 'F', 'false', 'FALSE'].include?(value.presence) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
microscope-1.1.1 | lib/microscope/utils.rb |
microscope-1.1.0 | lib/microscope/utils.rb |
microscope-1.0.1 | lib/microscope/utils.rb |
microscope-1.0.0 | lib/microscope/utils.rb |