Class: FeedSearcher

Inherits:
Object
  • Object
show all
Defined in:
lib/feed_searcher.rb,
lib/feed_searcher/page.rb,
lib/feed_searcher/fetcher.rb,
lib/feed_searcher/version.rb

Defined Under Namespace

Classes: Fetcher, Page

Constant Summary collapse

VERSION =
"0.0.6"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, options = {}) ⇒ FeedSearcher

Returns a new instance of FeedSearcher.



15
16
17
18
# File 'lib/feed_searcher.rb', line 15

def initialize(url, options = {})
  @url     = url
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



13
14
15
# File 'lib/feed_searcher.rb', line 13

def options
  @options
end

#urlObject (readonly)

Returns the value of attribute url.



13
14
15
# File 'lib/feed_searcher.rb', line 13

def url
  @url
end

Class Method Details

.search(*args) ⇒ Object



9
10
11
# File 'lib/feed_searcher.rb', line 9

def self.search(*args)
  new(*args).search
end

Instance Method Details

#searchObject



20
21
22
# File 'lib/feed_searcher.rb', line 20

def search
  fetch.feed_urls.map {|feed_url| URI.join(url, feed_url).to_s }
end