Typhoeus

Constants

VERSION
USER_AGENT

Public Class Methods

add_easy_request(easy_object) click to toggle source
    # File lib/typhoeus.rb, line 42
42:   def self.add_easy_request(easy_object)
43:     Thread.current[:curl_multi] ||= Typhoeus::Multi.new
44:     Thread.current[:curl_multi].add(easy_object)
45:   end
easy_object_pool() click to toggle source
    # File lib/typhoeus.rb, line 19
19:   def self.easy_object_pool
20:     @easy_objects ||= []
21:   end
get_easy_object() click to toggle source
    # File lib/typhoeus.rb, line 34
34:   def self.get_easy_object
35:     if easy_object_pool.empty?
36:       Typhoeus::Easy.new
37:     else
38:       easy_object_pool.pop
39:     end
40:   end
included(base) click to toggle source
   # File lib/typhoeus/remote.rb, line 4
4:   def self.included(base)
5:     base.extend ClassMethods
6:   end
init_easy_object_pool() click to toggle source
    # File lib/typhoeus.rb, line 23
23:   def self.init_easy_object_pool
24:     20.times do
25:       easy_object_pool << Typhoeus::Easy.new
26:     end
27:   end
perform_easy_requests() click to toggle source
    # File lib/typhoeus.rb, line 47
47:   def self.perform_easy_requests
48:     multi = Thread.current[:curl_multi]
49:     start_time = Time.now
50:     multi.easy_handles.each do |easy|
51:       easy.start_time = start_time
52:     end
53:     multi.perform
54:   end
release_easy_object(easy) click to toggle source
    # File lib/typhoeus.rb, line 29
29:   def self.release_easy_object(easy)
30:     easy.reset
31:     easy_object_pool << easy
32:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.