Module: Nanoc::StringExtensions
- Included in:
- String
- Defined in:
- lib/nanoc/base/core_ext/string.rb
Instance Method Summary (collapse)
-
- (String) checksum
private
Calculates the checksum for this string.
-
- (String) cleaned_identifier
Transforms string into an actual identifier.
Instance Method Details
- (String) checksum
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.
Calculates the checksum for this string. Any change to this string will result in a different checksum.
17 18 19 |
# File 'lib/nanoc/base/core_ext/string.rb', line 17 def checksum Nanoc::Checksummer.calc(self) end |
- (String) cleaned_identifier
Transforms string into an actual identifier
7 8 9 |
# File 'lib/nanoc/base/core_ext/string.rb', line 7 def cleaned_identifier "/#{self}/".gsub(/^\/+|\/+$/, '/') end |