Froze rails gems
[depot.git] / vendor / rails / activesupport / lib / active_support / core_ext / pathname / clean_within.rb
1 module ActiveSupport #:nodoc:
2 module CoreExtensions #:nodoc:
3 module Pathname #:nodoc:
4 module CleanWithin
5 # Clean the paths contained in the provided string.
6 def clean_within(string)
7 string.gsub(%r{[\w. ]+(/[\w. ]+)+(\.rb)?(\b|$)}) do |path|
8 new(path).cleanpath
9 end
10 end
11 end
12 end
13 end
14 end