Class: Feedigest::FeedFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/feedigest/feed_fetcher.rb

Defined Under Namespace

Classes: Feed

Constant Summary collapse

USER_AGENT =
"feedigest/#{Feedigest::VERSION}".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feed_urls, filter_cmd = nil) ⇒ FeedFetcher

Returns a new instance of FeedFetcher.



12
13
14
15
# File 'lib/feedigest/feed_fetcher.rb', line 12

def initialize(feed_urls, filter_cmd = nil)
  @feed_urls = feed_urls
  @filter_cmd = filter_cmd
end

Instance Attribute Details

#feed_urlsObject (readonly)

Returns the value of attribute feed_urls.



10
11
12
# File 'lib/feedigest/feed_fetcher.rb', line 10

def feed_urls
  @feed_urls
end

#filter_cmdObject (readonly)

Returns the value of attribute filter_cmd.



10
11
12
# File 'lib/feedigest/feed_fetcher.rb', line 10

def filter_cmd
  @filter_cmd
end

Instance Method Details

#feedsObject



17
18
19
# File 'lib/feedigest/feed_fetcher.rb', line 17

def feeds
  @feeds ||= all_feeds.select { |f| process_feed?(f) }
end