Module: Html2rss::Selectors::PostProcessors
- Defined in:
- lib/html2rss/selectors/post_processors.rb,
lib/html2rss/selectors/post_processors/base.rb,
lib/html2rss/selectors/post_processors/gsub.rb,
lib/html2rss/selectors/post_processors/template.rb,
lib/html2rss/selectors/post_processors/parse_uri.rb,
lib/html2rss/selectors/post_processors/substring.rb,
lib/html2rss/selectors/post_processors/parse_time.rb,
lib/html2rss/selectors/post_processors/sanitize_html.rb,
lib/html2rss/selectors/post_processors/html_to_markdown.rb,
lib/html2rss/selectors/post_processors/markdown_to_html.rb,
lib/html2rss/selectors/post_processors/html_transformers/wrap_img_in_a.rb,
lib/html2rss/selectors/post_processors/html_transformers/transform_urls_to_absolute_ones.rb
Overview
Provides a namespace for attribute post processors.
Defined Under Namespace
Modules: HtmlTransformers Classes: Base, Gsub, HtmlToMarkdown, InvalidType, MarkdownToHtml, MissingOption, ParseTime, ParseUri, SanitizeHtml, Substring, Template, UnknownPostProcessorName
Constant Summary collapse
- NAME_TO_CLASS =
Maps the post processor name to the class implementing the post processor.
The key is the name to use in the feed config.
{ gsub: Gsub, html_to_markdown: HtmlToMarkdown, markdown_to_html: MarkdownToHtml, parse_time: ParseTime, parse_uri: ParseUri, sanitize_html: SanitizeHtml, substring: Substring, template: Template }.freeze
Class Method Summary collapse
-
.get(name, value, context) ⇒ Object
Shorthand method to instantiate the post processor and call
#geton it.
Class Method Details
.get(name, value, context) ⇒ Object
Shorthand method to instantiate the post processor and call #get on it
37 38 39 40 |
# File 'lib/html2rss/selectors/post_processors.rb', line 37 def self.get(name, value, context) klass = NAME_TO_CLASS[name.to_sym] || raise(UnknownPostProcessorName, "Unknown name '#{name}'") klass.new(value, context).get end |