Skip to content

Instantly share code, notes, and snippets.

@wapcaplet
Created September 21, 2012 14:43
Show Gist options
  • Save wapcaplet/3761874 to your computer and use it in GitHub Desktop.
Save wapcaplet/3761874 to your computer and use it in GitHub Desktop.
[62] pry(main)> doc1 = Nokogiri::HTML(html)
=> #<Nokogiri::HTML::Document:0x50aa>
[63] pry(main)> doc2 = doc1.clone
=> #<Nokogiri::HTML::Document:0x50aa>
[64] pry(main)> doc1.content == doc2.content
=> true
[65] pry(main)> doc1.css('p').first.content
=> "CFO PayUp Modestly, Shifts from Fixed to Variable Comp"
[66] pry(main)> doc2.css('p')
=> []
[67] pry(main)> doc2.css('p').first
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment