Sha256: 6249069f8320b6edfd109390259d06b63d510df6f5d7ea4827fd3d5da3b8c1b4
Contents?: true
Size: 279 Bytes
Versions: 1
Compression:
Stored size: 279 Bytes
Contents
require 'rubygems' require 'nokogiri' require 'open-uri' class CssSelector def parse(html, selector) doc = Nokogiri::HTML(html) doc.search(selector).map {|e| e.content }.join("\n") end end def CssSelector(html, selector) CssSelector.new.parse(html, selector) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
css_selector-1.0.0 | lib/css_selector.rb |