Sha256: dd60b3737ed525ff66b6ff00cd8e49dff407f85b3cb2f28aba62b5b121da2bdd
Contents?: true
Size: 253 Bytes
Versions: 15
Compression:
Stored size: 253 Bytes
Contents
class String def presence return nil if self.empty? self end def underscore self.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end end
Version data entries
15 entries across 15 versions & 1 rubygems