append_to_file(path, *args, &block)public
Append text to a file. Since it depends on insert_into_file, it’s reversible.
Parameters
|
path of the file to be changed | |
|
the data to append to the file, can be also given as a block. | |
|
give :verbose => false to not log the status. |
Example
append_to_file 'config/environments/test.rb', 'config.gem "rspec"' append_to_file 'config/environments/test.rb' do 'config.gem "rspec"' end