Skip to content

Instantly share code, notes, and snippets.

@tonini
Created April 30, 2013 21:01
Show Gist options
  • Save tonini/5491922 to your computer and use it in GitHub Desktop.
Save tonini/5491922 to your computer and use it in GitHub Desktop.
(defun cabbage--run-single-ruby-file ()
(interactive)
(let* ((name (file-name-nondirectory (car (split-string (buffer-file-name)))))
(name-buffer (format "*%s*" name)))
(if (get-buffer name-buffer)
(kill-buffer name-buffer))
(ruby-compilation-run (buffer-file-name))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment