Move ale#handlers#ruby#EscapeExecutable to ale#ruby#EscapeExecutable

This function is generally applicable to Ruby, not just handling linter
output.
This commit is contained in:
Eddie Lebow
2019-08-13 01:52:13 -04:00
parent 28c93ab185
commit 58e8d32d79
12 changed files with 17 additions and 18 deletions

View File

@@ -74,3 +74,10 @@ function! ale#ruby#HandleRubocopOutput(buffer, lines) abort
return l:output
endfunction
function! ale#ruby#EscapeExecutable(executable, bundle_exec) abort
let l:exec_args = a:executable =~? 'bundle'
\ ? ' exec ' . a:bundle_exec
\ : ''
return ale#Escape(a:executable) . l:exec_args
endfunction