Function: ruby-flymake-rubocop--use-bundler-p

ruby-flymake-rubocop--use-bundler-p is a byte-compiled function defined in ruby-mode.el.gz.

Signature

(ruby-flymake-rubocop--use-bundler-p DIR)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ruby-mode.el.gz
(defun ruby-flymake-rubocop--use-bundler-p (dir)
  (cond
   ((eq t ruby-rubocop-use-bundler)
    t)
   ((null ruby-rubocop-use-bundler)
    nil)
   (t
    (let ((file (expand-file-name "Gemfile" dir)))
      (and (file-exists-p file)
           (with-temp-buffer
             (insert-file-contents file)
             (re-search-forward "^ *gem ['\"]rubocop['\"]" nil t)))))))