Class: Roda::RodaPlugins::Head::CloseLater

Inherits:
Object
  • Object
show all
Defined in:
lib/roda/plugins/head.rb

Overview

used to ensure proper resource release on HEAD requests we do not respond to a to_path method, here.

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ CloseLater

Returns a new instance of CloseLater.



43
44
45
# File 'lib/roda/plugins/head.rb', line 43

def initialize(body)
  @body = body
end

Instance Method Details

#closeObject

this should be called by the Rack server



52
53
54
# File 'lib/roda/plugins/head.rb', line 52

def close
  @body.close
end

#eachObject

yield nothing



48
49
# File 'lib/roda/plugins/head.rb', line 48

def each
end