while i was looking for some other answers, i found another interesting post on the comp.lang.ruby newsgroup.
how to capture the close-event from the main window assuming your using FXRuby :p (snippet from post):
theMainWindow.connect(SEL_CLOSE) doblog comments powered by Disqus
# Do fun things
verify_things
clean_up_things
if ok_to_quit?
# All is well to shut down, so go ahead
# and send the ID_QUIT message to the
# application.
theMainWindow.app.handle(theMainWindow,
MKUINT, nil)
else
#We’ve decided not to shut down after all
end
end