Method: Dao::Path.paths_for
- Defined in:
- lib/dao/path.rb
.paths_for(arg, *args) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/dao/path.rb', line 18 def paths_for(arg, *args) path = [arg, *args].flatten.compact.join('/') path.gsub!(%r|[.]+/|, '/') path.squeeze!('/') path.sub!(%r|^/|, '') path.sub!(%r|/$|, '') path.split('/') end |