Module: Nab::Util
- Defined in:
- lib/nab/util.rb
Class Method Summary collapse
Class Method Details
.path_from_uri(uri, strip_dirs = false) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/nab/util.rb', line 3 def self.path_from_uri(uri,strip_dirs=false) if strip_dirs File.basename(uri.path.gsub(/^\//, "")) else uri.path.gsub(/^\//, "") # remove leading slashes end end |