Class: Aranha::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/aranha/processor.rb

Constant Summary collapse

DEFAULT_MAX_TRIES =
3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(manager = nil) ⇒ Processor

Returns a new instance of Processor.



9
10
11
12
13
14
15
16
# File 'lib/aranha/processor.rb', line 9

def initialize(manager = nil)
  @manager = manager || ::Aranha::Manager.default
  @failed = {}
  @try = 0
  self.manager.init
  process_loop
  raise "Addresses failed: #{@failed.count}" if @failed.any?
end

Instance Attribute Details

#managerObject (readonly)

Returns the value of attribute manager.



7
8
9
# File 'lib/aranha/processor.rb', line 7

def manager
  @manager
end