Class/Module Index [+]

Quicksearch

Nanoc::StringExtensions

Public Instance Methods

checksum() click to toggle source

Calculates the checksum for this string. Any change to this string will result in a different checksum.

@return [String] The checksum for this string

@api private

# File lib/nanoc/base/core_ext/string.rb, line 17
def checksum
  digest = Digest::SHA1.new
  digest.update(self)
  digest.hexdigest
end
cleaned_identifier() click to toggle source

Transforms string into an actual identifier

@return [String] The identifier generated from the receiver

# File lib/nanoc/base/core_ext/string.rb, line 7
def cleaned_identifier
  "/#{self}/".gsub(/^\/+|\/+$/, '/')
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.