This posting is older than 6 months and can contain outdated information.
Thanks for asking.
Remote Buddy, like most other AppleScript-able applications, includes its developer documentation as part of its AppleScript Dictionary. To access it, open AppleScript Editor, select "Library" from its menu and double-click on Remote Buddy's entry. If Remote Buddy doesn't turn up in the list already, drag Remote Buddy's icon into it.
The dictionary already includes commented sample code. For more sample code, please see the Remote Buddy FAQ.
As for executing Applescript from Ruby: I never tried to do that.
Best regards,
Felix Schwarz