Sha256: c92851cd447ef2a4cb85add83856703c3419be63d50f0148aedd328fea03587a

Contents?: true

Size: 228 Bytes

Versions: 10

Compression:

Stored size: 228 Bytes

Contents

# encoding: utf-8

module Nanoc3::StringExtensions

  # Transforms string into an actual identifier
  def cleaned_identifier
    "/#{self}/".gsub(/^\/+|\/+$/, '/')
  end

end

class String
  include Nanoc3::StringExtensions
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nanoc3-3.0.9 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.8 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.7 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.6 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.5 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.4 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.3 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.2 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.1 lib/nanoc3/base/core_ext/string.rb
nanoc3-3.0.0 lib/nanoc3/base/core_ext/string.rb