class Guard::Guardfile::Generator
def create_guardfile
- See: Guard::CLI#init -
def create_guardfile if !File.exist?('Guardfile') ::Guard::UI.info "Writing new Guardfile to #{ Dir.pwd }/Guardfile" FileUtils.cp(GUARDFILE_TEMPLATE, 'Guardfile') elsif options[:abort_on_existence] ::Guard::UI.error "Guardfile already exists at #{ Dir.pwd }/Guardfile" abort end end