Module: Nanoc::Core::CoreExt::StringExtensions

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

Instance Method Summary collapse

Instance Method Details

#__nanoc_cleaned_identifierString

Transforms string into an actual identifier

Returns:

  • (String)

    The identifier generated from the receiver



10
11
12
# File 'lib/nanoc/core/core_ext/string.rb', line 10

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