Class: FeedSearcher::Fetcher

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Fetcher.



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

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/feed_searcher/fetcher.rb', line 7

def options
  @options
end

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/feed_searcher/fetcher.rb', line 7

def url
  @url
end

Class Method Details

.fetch(*args) ⇒ Object



3
4
5
# File 'lib/feed_searcher/fetcher.rb', line 3

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

Instance Method Details

#fetchObject



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

def fetch
  Page.new(get)
end