APIdock + emacs integration

Inspired by the post APIdock + vim integration, and feeling jealous for a second, i’ve thought: “Hey, this can be easily done with emacs!!”

So, here you have APIdoc + emacs integration.

Just copy it to somewhere in your emacs path (i.e., ~/.emacs.d), and add this line to your ~/.emacs:

(eval-after-load ‘ruby-mode ‘(require ‘rails-apidock))

Complete script:

;; Simple function to search in Apidoc rails API ;; [...]

Interceptando y examinando excepciones en una sesión de IRB

Cuando estás desarrollando con Ruby, generalmente (yo al menos), pasas bastante tiempo dentro de una sesión de IRB. Vas probando pequeñas funciones que has escrito, exploras una API de otro, etc, etc.

A veces, quieres probar una función que se supone que debería funcionad, pero está lanzando una excepción. Y el backtrace te muestra que el error está demasiado metido [...]

Catching and examining exceptions in a IRB session

When developing with Ruby, I usually spend a lot of time inside a IRB session. You can test little helper functions you are using, etc, etc.

Sometimes, you want to test one function that is not supposed to throw an exception, but is doing so. And the backtrace shows you that the error is buried very deeply in your [...]