class Async::HTTP::Statistics
Public Class Methods
new(start_time)
click to toggle source
# File lib/async/http/statistics.rb, line 34 def initialize(start_time) @start_time = start_time end
start()
click to toggle source
# File lib/async/http/statistics.rb, line 30 def self.start self.new(Clock.now) end
Public Instance Methods
wrap(response, &block)
click to toggle source
# File lib/async/http/statistics.rb, line 38 def wrap(response, &block) if response and response.body response.body = Body::Statistics.new(@start_time, response.body, block) end return response end