method
invoke!
ruby latest stable - Class:
Bundler::Thor::Actions::InjectIntoFile
invoke!()public
No documentation available.
# File lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb, line 47
def invoke!
say_status :invoke
content = if @behavior == :after
'\0' + replacement
else
replacement + '\0'
end
if exists?
replace!(/#{flag}/, content, config[:force])
else
unless pretend?
raise Bundler::Thor::Error, "The file #{ destination } does not appear to exist"
end
end
end