Method: Chef::Util::FileEdit#search_file_replace
- Defined in:
- lib/chef/util/file_edit.rb
#search_file_replace(regex, replace) ⇒ Object
search the file line by line and match each line with the given regex if matched, replace the match (all occurrences) with the replace parameter
52 53 54 |
# File 'lib/chef/util/file_edit.rb', line 52 def search_file_replace(regex, replace) @changes = (editor.replace(regex, replace) > 0) || @changes end |