Class: WebFetch::Gatherer
- Inherits:
-
Object
- Object
- WebFetch::Gatherer
- Includes:
- Validatable
- Defined in:
- lib/web_fetch/gatherer.rb
Overview
Handles requests to gather URLs and delegates to the EventMachine web server
Constant Summary collapse
- HASHABLE_KEYS =
%i[url query_string headers method].freeze
Instance Attribute Summary
Attributes included from Validatable
Instance Method Summary collapse
-
#initialize(server, params) ⇒ Gatherer
constructor
A new instance of Gatherer.
- #start ⇒ Object
Methods included from Validatable
Constructor Details
#initialize(server, params) ⇒ Gatherer
Returns a new instance of Gatherer.
11 12 13 14 |
# File 'lib/web_fetch/gatherer.rb', line 11 def initialize(server, params) @requests = params[:requests] @server = server end |
Instance Method Details
#start ⇒ Object
16 17 18 19 20 |
# File 'lib/web_fetch/gatherer.rb', line 16 def start tagged = { requests: tag_requests } @server.gather(tagged[:requests]) tagged end |