I'm not sure about Watir, but in Watir-Webdriver you extract script 
content like this:

driver.scripts[index].html

or

driver.scripts.each { |s| puts s.html }

-- 
Posted via http://www.ruby-forum.com/.