On 5/8/07, Seth .. <seth / animejunkie.org> wrote: > Hello, > > I've create a simple screen scraper which sends a message to a Jabber > client for notification. The scraper portion works as does the Jabber > portion but I'm having trouble passing the data from the scraper to the > Jabber client. > > Here's what gets all the data in the scraper portion > > > link.search("//font[@class='hosts']").each do |host| > > host.to_html.match(/[a-z]+[0-9]*\.(foo|bar)\.[a-z]+/) > > end > > I then have Jabber setup as follows > > cl = Client::new(myJID, false) > cl.connect > cl.auth(myPassword) > m = Message::new(to, > body).set_type(:normal).set_id('1').set_subject(subject) > cl.send(m) > cl.close > > I somehow have to get the data into the body variable. Any ideas? > > -- > Posted via http://www.ruby-forum.com/. > > #map and #to_yaml should do it body = link.search("//font[@class='hosts']").map do |host| host.to_html.match(/[a-z]+[0-9]*\.(foo|bar)\.[a-z]+/) end.to_yaml -- Chris Carter concentrationstudios.com brynmawrcs.com