Class: Koine::Filesystem::PathSanitizer
- Inherits:
-
Object
- Object
- Koine::Filesystem::PathSanitizer
- Defined in:
- lib/koine/filesystem/path_sanitizer.rb
Instance Method Summary collapse
Instance Method Details
#sanitize(path) ⇒ Object
8 9 10 |
# File 'lib/koine/filesystem/path_sanitizer.rb', line 8 def sanitize(path) path.to_s.gsub('/../', '/').gsub(%r{\.?\./}, '') end |