Class: Typhoeus::Multi

Inherits:
Object
  • Object
show all
Defined in:
lib/typhoeus/multi.rb,
ext/typhoeus/typhoeus_multi.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMulti

Returns a new instance of Multi.



5
6
7
# File 'lib/typhoeus/multi.rb', line 5

def initialize
  reset_easy_handles
end

Instance Attribute Details

#easy_handlesObject (readonly)

Returns the value of attribute easy_handles.



3
4
5
# File 'lib/typhoeus/multi.rb', line 3

def easy_handles
  @easy_handles
end

Instance Method Details

#add(easy) ⇒ Object



13
14
15
16
# File 'lib/typhoeus/multi.rb', line 13

def add(easy)
  @easy_handles << easy
  multi_add_handle(easy)
end

#cleanupObject



25
26
27
# File 'lib/typhoeus/multi.rb', line 25

def cleanup()
  multi_cleanup
end

#performObject



18
19
20
21
22
23
# File 'lib/typhoeus/multi.rb', line 18

def perform()
  while active_handle_count > 0 do
    multi_perform
  end
  reset_easy_handles
end

#remove(easy) ⇒ Object



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

def remove(easy)
  multi_remove_handle(easy)
end