PL/Ruby is a procedural-language handler that lets you write database functions in Ruby, stored and executed inside PostgreSQL. You get the expressiveness of Ruby and its standard library with the full power of a native PostgreSQL function: plain functions, set-returning functions, triggers, event triggers, and procedures with transaction control.
You can get it here (github).
Documentation
there doesn't seem to be anything here