lib/html2rss/item_extractors.rb in html2rss-0.7.0 vs lib/html2rss/item_extractors.rb in html2rss-0.8.0

- old
+ new

@@ -1,15 +1,13 @@ module Html2rss ## # Provides a namespace for item extractors. module ItemExtractors - DEFAULT = 'Text'.freeze + DEFAULT = 'text'.freeze def self.get_extractor(name) @get_extractor ||= Hash.new do |extractors, key| - camel_cased_name = (key || DEFAULT).split('_').map(&:capitalize).join - class_name = ['Html2rss', 'ItemExtractors', camel_cased_name].join('::') - extractors[key] = Object.const_get(class_name) + extractors[key] = Utils.get_class_from_name(key || DEFAULT, 'ItemExtractors') end @get_extractor[name] end