Class: CW::RSSClean
- Inherits:
-
Object
- Object
- CW::RSSClean
- Defined in:
- lib/cw/rss_clean.rb
Instance Method Summary collapse
-
#initialize(html_fragment) ⇒ RSSClean
constructor
A new instance of RSSClean.
- #scrub(options = {}) ⇒ Object
Constructor Details
#initialize(html_fragment) ⇒ RSSClean
Returns a new instance of RSSClean.
5 6 7 |
# File 'lib/cw/rss_clean.rb', line 5 def initialize(html_fragment) @html_fragment = html_fragment end |
Instance Method Details
#scrub(options = {}) ⇒ Object
9 10 11 12 13 |
# File 'lib/cw/rss_clean.rb', line 9 def scrub( = {}) = NON_CONTENT_TAGS + .fetch(:blacklist, []) sanitize(Oga.parse_html(html_fragment).children, ) end |