lib/html2rss/attribute_post_processors.rb in html2rss-0.3.3 vs lib/html2rss/attribute_post_processors.rb in html2rss-0.4.0

- old
+ new

@@ -3,13 +3,15 @@ require_relative 'attribute_post_processors/sanitize_html' require_relative 'attribute_post_processors/substring' require_relative 'attribute_post_processors/template' module Html2rss + ## + # Provides a namespace for attribute post processors. module AttributePostProcessors - def self.get_processor(options) - camel_cased_option = options['name'].split('_').collect(&:capitalize).join - class_name = ['Html2rss', 'AttributePostProcessors', camel_cased_option].join('::') + def self.get_processor(name) + camel_cased_name = name.split('_').map(&:capitalize).join + class_name = ['Html2rss', 'AttributePostProcessors', camel_cased_name].join('::') Object.const_get(class_name) end end end