class InfluxReporter::BodyProxy
Public Class Methods
new(body, &block)
click to toggle source
# File lib/influx_reporter/middleware.rb, line 33 def initialize(body, &block) @body = body @block = block @closed = false end
Public Instance Methods
close()
click to toggle source
# File lib/influx_reporter/middleware.rb, line 43 def close return if closed? @closed = true begin @body.close if @body.respond_to?(:close) ensure @block.call end end
closed?()
click to toggle source
# File lib/influx_reporter/middleware.rb, line 55 def closed? @closed end
method_missing(*args, &block)
click to toggle source
# File lib/influx_reporter/middleware.rb, line 59 def method_missing(*args, &block) @body.__send__(*args, &block) end
respond_to?(*args)
click to toggle source
Calls superclass method
# File lib/influx_reporter/middleware.rb, line 39 def respond_to?(*args) super || @body.respond_to?(*args) end