You might want to take a look at this plugin:
I did that to enable oneboxing of one of my own sites. It simply replaces the onebox with an iframe with a specific URL, where my website delivers a special embed-friendly view of the target site.
I pretty clueless when it comes to Ruby, so this may not be state of the art, but it might be enough to get you started ![]()
(Remember to also test what happens in notification mails containing the post.)