Class: Thin::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/thin_extensions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#websocket_upgrade_dataObject

Headers for sending Websocket upgrade



143
144
145
# File 'lib/thin_extensions.rb', line 143

def websocket_upgrade_data
  @websocket_upgrade_data
end

Instance Method Details

#eachObject



145
146
147
148
149
150
151
152
# File 'lib/thin_extensions.rb', line 145

def each
  websocket_upgrade_data ? yield(websocket_upgrade_data) : yield(head)
  if @body.is_a?(String)
    yield @body
  else
    @body.each { |chunk| yield chunk }
  end
end