Sha256: f64c2b5b78531c7268f61fc6a1d4f12f75d659944d1a745fa4f2f8391d0cd8f6
Contents?: true
Size: 158 Bytes
Versions: 1
Compression:
Stored size: 158 Bytes
Contents
class String def my_titleize #self.gsub(/(\b[\w']+\b|_)(.)/) { "#{$1}#{$2.upcase}" } self.gsub(/\b(['’]?[a-z])/) { "#{$1.capitalize}" } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bolognese-0.9.74 | lib/bolognese/string.rb |