Ruby wrapper for HTML Tidy Library Project (tidy.sf.net).
tidyBufFree
# File lib/tidy/tidylib.rb, line 34 def buf_free(buf) tidyBufFree(buf) end
tidyCleanAndRepair
# File lib/tidy/tidylib.rb, line 46 def clean_and_repair(doc) tidyCleanAndRepair(doc) end
tidyCreate
# File lib/tidy/tidylib.rb, line 40 def create tidyCreate end
Load the library.
# File lib/tidy/tidylib.rb, line 11 def load(path) begin dlload(path) rescue raise LoadError, "Unable to load #{path}" end extern "void *tidyCreate()" extern "void tidyBufFree(void*)" extern "int tidyCleanAndRepair(void*)" extern "int tidyLoadConfig(void*, char*)" extern "int tidyOptGetIdForName(char*)" extern "char tidyOptGetValue(void*, unsigned int)" extern "int tidyOptParseValue(void*, char*, char*)" extern "int tidyParseString(void*, char*)" extern "void tidyRelease(void*)" extern "char* tidyReleaseDate()" extern "int tidyRunDiagnostics(void*)" extern "int tidySaveBuffer(void*, void*)" extern "int tidySetErrorBuffer(void*, void*)" end
tidyLoadConfig
# File lib/tidy/tidylib.rb, line 52 def load_config(doc, file) tidyLoadConfig(doc, file.to_s) end
tidyOptGetValue (returns true/false instead of 1/0)
# File lib/tidy/tidylib.rb, line 64 def opt_get_value(doc, name) value = tidyOptGetValue(doc, tidyOptGetIdForName(translate_name(name))) Tidy.to_b(value) end
tidyOptParseValue
# File lib/tidy/tidylib.rb, line 58 def opt_parse_value(doc, name, value) tidyOptParseValue(doc, translate_name(name), value.to_s) end
tidyParseString
# File lib/tidy/tidylib.rb, line 71 def parse_string(doc, str) tidyParseString(doc, str.to_s) end
tidyRelease
# File lib/tidy/tidylib.rb, line 77 def release(doc) tidyRelease(doc) end
tidyReleaseDate
# File lib/tidy/tidylib.rb, line 83 def release_date tidyReleaseDate end
tidyRunDiagnostics
# File lib/tidy/tidylib.rb, line 89 def run_diagnostics(doc) tidyRunDiagnostics(doc) end
tidySaveBuffer
# File lib/tidy/tidylib.rb, line 95 def save_buffer(doc, buf) tidySaveBuffer(doc, buf) end
Generated with the Darkfish Rdoc Generator 2.