Sha256: c611fe103315f5d6633bf9a8dfd7d31a1989249882b3373e01d991c5aa579bc3

Contents?: true

Size: 228 Bytes

Versions: 6

Compression:

Stored size: 228 Bytes

Contents

# frozen_string_literal: true

# Simpler versions of extensions from ActiveSupport.
#
class String
  def strip_heredoc
    gsub(/^ +/, "")
  end

  def titleize
    tr("_-", " ").split(" ").map(&:capitalize).join(" ")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nutrella-1.5.1 lib/nutrella/string_ext.rb
nutrella-1.5.0 lib/nutrella/string_ext.rb
nutrella-1.4.0 lib/nutrella/string_ext.rb
nutrella-1.3.1 lib/nutrella/string_ext.rb
nutrella-1.2.2 lib/nutrella/string_ext.rb
nutrella-1.2.1 lib/nutrella/string_ext.rb