Class: PollEverywhere::HTTP::Adapter::Doc

Inherits:
Sync
  • Object
show all
Defined in:
lib/polleverywhere/http/adapter.rb

Instance Attribute Summary

Attributes inherited from Sync

#request, #response

Instance Method Summary collapse

Methods inherited from Sync

#initialize

Constructor Details

This class inherits a constructor from PollEverywhere::HTTP::Adapter::Sync

Instance Method Details

#execute(request, &block) ⇒ Object


32
33
34
35
# File 'lib/polleverywhere/http/adapter.rb', line 32

def execute(request, &block)
  requests << request
  super request, &block
end

#last_requestsObject


41
42
43
# File 'lib/polleverywhere/http/adapter.rb', line 41

def last_requests
  requests[(@last_request ||= 0)..(@last_request=requests.size)]
end

#requestsObject


37
38
39
# File 'lib/polleverywhere/http/adapter.rb', line 37

def requests
  @requests ||= []
end