Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Tidy library interface via FFI
branch: master

Use default_options method instead of ivar in setter

This allows setting default_options before default_options is called.
There's no tests, becasue right now default_options leaves a
side-effect, so I cannot reliably bring it to the initial state.

Closes #5
latest commit 5d6f7281f9
Eugene Pimenov authored

README.rdoc

Tidy FFI

What is it all about?

I wanted to have a clean and simple tidy library. For example:

TidyFFI::Tidy.new('a string').clean

For now it can't do anything else than clean (and saves errors from it) :)

Options

You can use different ways to specify options. These examples produce the same output:

TidyFFI::Tidy.default_options.show_body_only = true
TidyFFI::Tidy.new('test').clean

TidyFFI::Tidy.with_options(:show_body_only => true).new('test').clean

tidy = TidyFFI::Tidy.new('test')
tidy.options.show_body_only = true
tidy.clean

TidyFFI::Tidy.new('test', :show_body_only => true).clean

TidyFFI::Tidy.clean('test', :show_body_only => 1)

Other stuff

And of course, it's depenedent on ffi and libtidy. So make sure they're installed before using the library!

Something went wrong with that request. Please try again.