Sha256: 6b3267b2f6c43d785d383e8c04ae802364b3289821a831109194146cf744e0a6
Contents?: true
Size: 218 Bytes
Versions: 37
Compression:
Stored size: 218 Bytes
Contents
class String def blank? strip.empty? end def snake_case return self.downcase if self =~ /^[A-Z]+$/ self.gsub(/([A-Z]+)(?=[A-Z][a-z]?)|\B[A-Z]/, '_\&') =~ /_*(.*)/ return $+.downcase end end
Version data entries
37 entries across 37 versions & 2 rubygems