Module: Nanoc::StringExtensions Private

Included in:
String
Defined in:
lib/nanoc/base/core_ext/string.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#__nanoc_cleaned_identifierString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Transforms string into an actual identifier

Returns:

  • (String)

    The identifier generated from the receiver



6
7
8
# File 'lib/nanoc/base/core_ext/string.rb', line 6

def __nanoc_cleaned_identifier
  "/#{self}/".gsub(/^\/+|\/+$/, '/')
end