Sha256: 146371803e261674559242e7f69f23e48c62e034201771386f9a1316f6dd0058
Contents?: true
Size: 313 Bytes
Versions: 2
Compression:
Stored size: 313 Bytes
Contents
class Object def blank? respond_to?(:empty?) ? empty? : !self end end class Hash def to_query_string self.map { |k, v| "#{k}=#{v}" }.join("&") end end class String def blank? self !~ /\S/ end def invalid? self !~ /^\d{5}-\d{3}$/ end def clean self.gsub "-", "" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mooamba-0.0.2 | lib/mooamba/core_ext.rb |
mooamba-0.0.1 | lib/mooamba/core_ext.rb |