Class: Html::Sanitizer

Inherits:
Object
  • Object
show all
Defined in:
lib/html/sanitizer/sanitizer.rb,
lib/html/sanitizer.rb,
lib/html/sanitizer/version.rb

Overview

:nodoc:

Direct Known Subclasses

FullSanitizer, LinkSanitizer, WhiteListSanitizer

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.full_sanitizerObject



9
10
11
# File 'lib/html/sanitizer.rb', line 9

def full_sanitizer
  Html::FullSanitizer
end


13
14
15
# File 'lib/html/sanitizer.rb', line 13

def link_sanitizer
  Html::LinkSanitizer
end

.white_list_sanitizerObject



17
18
19
# File 'lib/html/sanitizer.rb', line 17

def white_list_sanitizer
  Html::WhiteListSanitizer
end

Instance Method Details

#sanitize(html, options = {}) ⇒ Object

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/html/sanitizer/sanitizer.rb', line 5

def sanitize(html, options = {})
  raise NotImplementedError, "subclasses must implement sanitize method."
end