# File lib/guard.rb, line 51
    def initialize_template(guard_name)
      guard_class = ::Guard.get_guard_class(guard_name, true)

      if guard_class
        guard_class.init(guard_name)
      elsif File.exist?(File.join(HOME_TEMPLATES, guard_name))
        content  = File.read('Guardfile')
        template = File.read(File.join(HOME_TEMPLATES, guard_name))

        File.open('Guardfile', 'wb') do |f|
          f.puts(content)
          f.puts("")
          f.puts(template)
        end

        ::Guard::UI.info "#{ guard_name } template added to Guardfile, feel free to edit it"
      else
        const_name  = guard_name.downcase.gsub('-', '')
        UI.error "Could not load 'guard/#{ guard_name.downcase }' or '~/.guard/templates/#{ guard_name.downcase }' or find class Guard::#{ const_name.capitalize }"
      end
    end