instance method
match_file
Ruby on Rails 8.0.4
Since v7.0.10 PrivateSignature
match_file(path, pattern)
No documentation comment.
Parameters
-
pathreq -
patternreq
Source
# File railties/lib/rails/generators/actions.rb, line 517
def match_file(path, pattern)
File.read(path).match(pattern) if File.exist?(path)
end
Defined in railties/lib/rails/generators/actions.rb line 517
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::Actions