Class: RSSable::Parsers::ItemClassBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/rssable/parsers/item_class_builder.rb

Class Method Summary collapse

Class Method Details

.call(driver:) ⇒ Class

Returns the parser class for the given driver

Returns:

  • (Class)


7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rssable/parsers/item_class_builder.rb', line 7

def self.call(driver:)
  case driver
  when :wordpress
    RSSable::Parsers::Items::Wordpress
  when :blogger
    RSSable::Parsers::Items::Blogger
  when :medium
    RSSable::Parsers::Items::Medium
  else
    RSSable::Parsers::Items::Base
  end
end