Skip to content
This repository

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 July 31, 2013
Octocat-spinner-32 lib Use default_options method instead of ivar in setter July 31, 2013
Octocat-spinner-32 spec Downcase enum values on validation December 11, 2012
Octocat-spinner-32 .gitignore Port specs to rspec. February 13, 2012
Octocat-spinner-32 .rspec Port specs to rspec. February 13, 2012
Octocat-spinner-32 .travis.yml install libtidy in travis December 16, 2012
Octocat-spinner-32 CHANGELOG Cut a new version December 12, 2012
Octocat-spinner-32 Gemfile Port specs to rspec. February 13, 2012
Octocat-spinner-32 LICENSE Initial commit February 12, 2009
Octocat-spinner-32 Manifest Updated Rakefile and Manifest to reflect README rename March 14, 2009
Octocat-spinner-32 README.rdoc Update readme file December 12, 2012
Octocat-spinner-32 Rakefile Port specs to rspec. February 13, 2012
Octocat-spinner-32 tidy_ffi.gemspec Cut a new version December 12, 2012
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.