Module: EventMachine::Synchrony::Mechanize::DeferedNetHttpPersistentRequest

Defined in:
lib/em-synchrony/mechanize.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


12
13
14
15
16
17
# File 'lib/em-synchrony/mechanize.rb', line 12

def self.included(base)
  base.class_eval do
    alias :request_without_defer :request
    alias :request :request_with_defer
  end
end

Instance Method Details

#request_with_defer(*args, &blk) ⇒ Object


19
20
21
22
23
# File 'lib/em-synchrony/mechanize.rb', line 19

def request_with_defer(*args, &blk)
  EM::Synchrony.defer do
    request_without_defer(*args, &blk)
  end
end