Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/nanoc2/base/core_ext/string.rb
Instance Method Summary collapse
-
#cleaned_path ⇒ Object
Transforms string into an actual path.
Instance Method Details
#cleaned_path ⇒ Object
Transforms string into an actual path
4 5 6 |
# File 'lib/nanoc2/base/core_ext/string.rb', line 4 def cleaned_path "/#{self}/".gsub(/^\/+|\/+$/, '/') end |