Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc2/base/core_ext/string.rb

Instance Method Summary collapse

Instance Method Details

#cleaned_pathObject

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