Class: CssSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/css_selector.rb

Instance Method Summary collapse

Instance Method Details

#parse(html, selector) ⇒ Object



6
7
8
9
# File 'lib/css_selector.rb', line 6

def parse(html, selector)
  doc = Nokogiri::HTML(html)
  doc.search(selector).map {|e| e.content }.join("\n")
end