Advertisement
cd62131

Relative Path in Ruby

Jan 20th, 2014
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.17 KB | None | 0 0
  1. #/usr/bin/ruby
  2. # coding: utf-8
  3. require 'pathname'
  4. Pathname.glob('d/**/*.html').sort_by {|e| e.to_s}.each do |file|
  5.   puts "#{file.dirname.basename}/#{file.basename}"
  6. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement