Method: Fig::OS#strip_paths_for_list
- Defined in:
- lib/fig/os.rb
#strip_paths_for_list(ls_output, packages, path) ⇒ Object
65 66 67 68 69 70 71 72 73 |
# File 'lib/fig/os.rb', line 65 def strip_paths_for_list(ls_output, packages, path) if not ls_output.nil? ls_output = ls_output.gsub(path + '/', '').gsub(path, '').split("\n") ls_output.each do |line| parts = line.gsub(/\\/, '/').sub(/^\.\//, '').sub(/:$/, '').chomp().split('/') packages << parts.join('/') if parts.size == 2 end end end |