def add(path)
      str = "#{path} filter=rgc diff=rgc"
      if content.include?(str)
        abort "`#{str}\n` is already included in #{@location}."
      end

      File.open(@location, 'a') do |f|
        f.write("#{str}\n")
      end
    rescue Errno::ENOENT
      abort "File #{@location} does not exists."
    rescue Errno::EACCES
      abort "File #{@location} is not accessible for writing."
    end
def add(path)
      str = "
      if content.include?(str)
        abort "`
      end

      File.open(@location, 'a') do |f|
        f.write("
      end
    rescue Errno::ENOENT
      abort "File 
    rescue Errno::EACCES
      abort "File 
    end
def add ( path ) str = "#{path} filter=rgc diff=rgc" if content . include? ( str ) abort "`#{str}\n` is already included in #{@location}." end File . open ( @location , 'a' ) do | f | f . write ( "#{str}\n" ) end rescue Errno :: ENOENT abort "File #{@location} does not exists." rescue Errno :: EACCES abort "File #{@location} is not accessible for writing." end
Add new path to the gitattributes file
Add new path to the gitattributes file