Sha256: 76cea1e2ed9b70ee500e67f294379836b6ff64fee1c56ce274b0fddc1f4b2416

Contents?: true

Size: 98 Bytes

Versions: 44

Compression:

Stored size: 98 Bytes

Contents

class String
  def my_titleize
    self.gsub(/\b(['’]?[a-z])/) { "#{$1.capitalize}" }
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
bolognese-0.10.21 lib/bolognese/string.rb
bolognese-0.10.20 lib/bolognese/string.rb
bolognese-0.10.19 lib/bolognese/string.rb
bolognese-0.10.18 lib/bolognese/string.rb
bolognese-0.10.17 lib/bolognese/string.rb
bolognese-0.10.16 lib/bolognese/string.rb
bolognese-0.10.15 lib/bolognese/string.rb
bolognese-0.10.14 lib/bolognese/string.rb
bolognese-0.10.13 lib/bolognese/string.rb
bolognese-0.10.11 lib/bolognese/string.rb
bolognese-0.10.10 lib/bolognese/string.rb
bolognese-0.10.9 lib/bolognese/string.rb
bolognese-0.10.8 lib/bolognese/string.rb
bolognese-0.10.7 lib/bolognese/string.rb
bolognese-0.10.6 lib/bolognese/string.rb
bolognese-0.10.5 lib/bolognese/string.rb
bolognese-0.10.4 lib/bolognese/string.rb
bolognese-0.10.3 lib/bolognese/string.rb
bolognese-0.10.2 lib/bolognese/string.rb
bolognese-0.10 lib/bolognese/string.rb