instance method
clean_within
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
clean_within(string)
Clean the paths contained in the provided string.
Parameters
-
stringreq
Source
# File activesupport/lib/active_support/core_ext/pathname/clean_within.rb, line 6
def clean_within(string)
string.gsub(%r{[\w. ]+(/[\w. ]+)+(\.rb)?(\b|$)}) do |path|
new(path).cleanpath
end
end
Defined in activesupport/lib/active_support/core_ext/pathname/clean_within.rb line 6
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::CoreExtensions::Pathname::CleanWithin