F
furfey
Hello,
Very new to Ruby and I'm curious if this is possible....
I have the following code which is returning a chunk of html that I
want.
Right now, all it does is print to the screen. Is it possible to have
the outputted chunk of html placed in a mysql db record? If so, can
anyone recommend some starting resources or examples.
Thanks!
#!/usr/bin/env ruby
require 'hpricot'
require 'open-uri'
doc = Hpricot(open("some_url"))
doc.search('dir').each do | element |
puts "#{element.inner_html}"
end
Very new to Ruby and I'm curious if this is possible....
I have the following code which is returning a chunk of html that I
want.
Right now, all it does is print to the screen. Is it possible to have
the outputted chunk of html placed in a mysql db record? If so, can
anyone recommend some starting resources or examples.
Thanks!
#!/usr/bin/env ruby
require 'hpricot'
require 'open-uri'
doc = Hpricot(open("some_url"))
doc.search('dir').each do | element |
puts "#{element.inner_html}"
end