Class: Hootenanny::FeedStore::WebFeedStore

Inherits:
Object
  • Object
show all
Defined in:
lib/hootenanny/feed_store/web_feed_store.rb

Constant Summary collapse

CONTENT_TYPE_MAPPINGS =
{
  'application/rss+xml'  => 'RSS',
  'application/atom+xml' => 'Atom',
  'application/json'     => 'JSON',
}

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ WebFeedStore

Returns a new instance of WebFeedStore.



13
14
# File 'lib/hootenanny/feed_store/web_feed_store.rb', line 13

def initialize(options = {})
end

Instance Method Details

#fetch(options = {}) ⇒ Object



16
17
18
19
20
21
# File 'lib/hootenanny/feed_store/web_feed_store.rb', line 16

def fetch(options = {})
  self.url = options.fetch(:url)

  Hootenanny::Feed.infer(content,
                         type: feed_serialization_type)
end