Method: Chef::Util::FileEdit#insert_line_after_match

Defined in:
lib/chef/util/file_edit.rb

#insert_line_after_match(regex, newline) ⇒ Object

search the file line by line and match each line with the given regex if matched, insert newline after each matching line



70
71
72
# File 'lib/chef/util/file_edit.rb', line 70

def insert_line_after_match(regex, newline)
  @changes = (editor.append_line_after(regex, newline) > 0) || @changes
end