Skip to content

Instantly share code, notes, and snippets.

@krasnoukhov
Created November 5, 2014 10:08
Show Gist options
  • Save krasnoukhov/e4889e1c9f8775310303 to your computer and use it in GitHub Desktop.
Save krasnoukhov/e4889e1c9f8775310303 to your computer and use it in GitHub Desktop.
SAXMachine nokogiri proof
$ ruby test.rb
Handler: nokogiri
wow
source "https://rubygems.org"
gem "sax-machine", github: "pauldix/sax-machine"
gem "nokogiri"
GIT
remote: git://github.com/pauldix/sax-machine.git
revision: d6f2772ecd25442de39bf99771fe6cd170aebaa8
specs:
sax-machine (1.0.2)
GEM
remote: https://rubygems.org/
specs:
mini_portile (0.6.1)
nokogiri (1.6.4)
mini_portile (~> 0.6.0)
PLATFORMS
ruby
DEPENDENCIES
nokogiri
sax-machine!
require "bundler"
Bundler.require
puts "Handler: #{SAXMachine.handler}"
class Omg
include SAXMachine
element :lol
end
puts Omg.parse("<lol>wow</lol>").lol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment