Created
November 19, 2010 23:17
-
-
Save tenderlove/707386 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Tidy | |
extend FFI::Library | |
ffi_lib "libtidy.dylib" | |
attach_function :tidyFileExists, [:string], :int | |
attach_function :tidyCreate, [], :pointer | |
attach_function :tidyParseString, [:pointer, :string], :int | |
attach_function :tidySaveStdout, [:pointer], :int | |
end | |
tdoc = Tidy.tidyCreate | |
Tidy.tidyParseString tdoc, "<title>Foo</title" | |
Tidy.tidySaveStdout tdoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment