Sha256: 1b57e849377514b5d8f107d05c9ed18a02adb437c0fe100f83de76e78f460b4e
Contents?: true
Size: 428 Bytes
Versions: 4
Compression:
Stored size: 428 Bytes
Contents
module Prmd # For any tid bits, or core extension methods, without the "core" extension module Utils # For checking if the string contains only spaces BLANK_REGEX = /\A\s+\z/ def self.blank?(obj) if obj.nil? true elsif obj.is_a?(String) obj.empty? || !!(obj =~ BLANK_REGEX) elsif obj.respond_to?(:empty?) obj.empty? else false end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
prmd-0.14.0 | lib/prmd/utils.rb |
prmd-0.13.0 | lib/prmd/utils.rb |
prmd-0.12.0 | lib/prmd/utils.rb |
prmd-0.11.11 | lib/prmd/utils.rb |