Module ActiveSupport::CoreExtensions::Pathname::CleanWithin
In: vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb

Methods

Public Instance methods

Clean the paths contained in the provided string.

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/pathname/clean_within.rb, line 6
 6:         def clean_within(string)
 7:           string.gsub(%r{[\w. ]+(/[\w. ]+)+(\.rb)?(\b|$)}) do |path|
 8:             new(path).cleanpath
 9:           end
10:         end

[Validate]