Class: Mato::HtmlFilters::Sanitization

Inherits:
Object
  • Object
show all
Defined in:
lib/mato/html_filters/sanitization.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sanitize:) ⇒ Sanitization

Returns a new instance of Sanitization.

Parameters:

  • sanitize (Sanitize)


12
13
14
# File 'lib/mato/html_filters/sanitization.rb', line 12

def initialize(sanitize:)
  @sanitize = sanitize
end

Instance Attribute Details

#sanitizeObject (readonly)

Returns the value of attribute sanitize.



9
10
11
# File 'lib/mato/html_filters/sanitization.rb', line 9

def sanitize
  @sanitize
end

Instance Method Details

#call(doc) ⇒ Object



16
17
18
# File 'lib/mato/html_filters/sanitization.rb', line 16

def call(doc)
  sanitize.node!(doc)
end