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



134
135
136
# File 'lib/thin_extensions.rb', line 134

def websocket_upgrade_data
  @websocket_upgrade_data
end

Instance Method Details

#eachObject



136
137
138
139
140
141
142
143
# File 'lib/thin_extensions.rb', line 136

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