Method: Makit::Directory.normalize
- Defined in:
- lib/makit/directory.rb
.normalize(path) ⇒ Object
Normalize the path by removing any leading or trailing slashes and replacing any backslashes with forward slashes
153 154 155 156 157 158 |
# File 'lib/makit/directory.rb', line 153 def self.normalize(path) path = path.gsub("\\", "/") # path = path[1..-1] if path.start_with?("/") path = path[0..-2] if path.end_with?("/") path end |