           If you already installed rubocop, Please check package setting at `Rubocop Command Path`.
           ''' }
         )
+    [command, args]
+
+  autoCorrectBuffer: (buffer)  ->
+    tempFilePath = @makeTempFile("rubocop.rb")
+    fs.writeFileSync(tempFilePath, buffer.getText())
+
+    rubocopCommand = @rubocopCommand()
+    command = rubocopCommand[0]
+    args = rubocopCommand[1]
+      .concat(['-a', tempFilePath])
+      .concat(@projectRootRubocopConfig(buffer.getPath()))
 
     rubocop = spawnSync(command, args, { encoding: 'utf-8', timeout: 5000 })
 

    else
      []

  autoCorrectBuffer: (buffer)  ->
    tempFilePath = @makeTempFile("rubocop.rb")
    fs.writeFileSync(tempFilePath, buffer.getText())
    commandWithArgs = atom.config.get('rubocop-auto-correct.rubocopCommandPath')
                                .split(/\s+/).filter((i) -> i)
                                .concat(['-a', tempFilePath])
                                .concat(@projectRootRubocopConfig(buffer.getPath()))
    command = commandWithArgs[0]
    args = commandWithArgs[1..]


      @rubocopOutput(buffer.getBaseName(), rubocop.stdout)

  autoCorrectFile: (filePath)  ->
    rubocopCommand = @rubocopCommand()
    command = rubocopCommand[0]
    args = rubocopCommand[1]
      .concat(['-a', filePath])
      .concat(@projectRootRubocopConfig(filePath))

    stdout = (output) =>
      @rubocopOutput(filePath.replace(/.+\//, ""), output)
