Sha256: f7e9f3cd0edfe7eb041878437b0584c7f97df4476117df5f1ea34260cb117094

Contents?: true

Size: 342 Bytes

Versions: 41

Compression:

Stored size: 342 Bytes

Contents

# frozen_string_literal: true

# @api private
module Nanoc::StringExtensions
  # Transforms string into an actual identifier
  #
  # @return [String] The identifier generated from the receiver
  def __nanoc_cleaned_identifier
    "/#{self}/".gsub(/^\/+|\/+$/, '/')
  end
end

# @api private
class String
  include Nanoc::StringExtensions
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
nanoc-4.8.15 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.14 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.13 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.12 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.11 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.10 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.9 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.8 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.7 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.6 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.5 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.4 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.3 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.2 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.1 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.0 lib/nanoc/base/core_ext/string.rb
nanoc-4.7.14 lib/nanoc/base/core_ext/string.rb
nanoc-4.7.13 lib/nanoc/base/core_ext/string.rb
nanoc-4.7.12 lib/nanoc/base/core_ext/string.rb
nanoc-4.7.11 lib/nanoc/base/core_ext/string.rb