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.11.0 lib/nanoc/base/core_ext/string.rb
nanoc-4.10.4 lib/nanoc/base/core_ext/string.rb
nanoc-4.10.3 lib/nanoc/base/core_ext/string.rb
nanoc-4.10.2 lib/nanoc/base/core_ext/string.rb
nanoc-4.10.1 lib/nanoc/base/core_ext/string.rb
nanoc-4.10.0 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.9 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.8 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.7 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.6 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.5 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.4 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.3 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.2 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.1 lib/nanoc/base/core_ext/string.rb
nanoc-4.9.0 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.19 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.18 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.17 lib/nanoc/base/core_ext/string.rb
nanoc-4.8.16 lib/nanoc/base/core_ext/string.rb