Class: Thin::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#websocketObject

Headers for sending Websocket upgrade



64
65
66
# File 'lib/faye/thin_extensions.rb', line 64

def websocket
  @websocket
end

Instance Method Details

#each {|head| ... } ⇒ Object

Yields:

  • (head)


66
67
68
69
70
71
72
73
# File 'lib/faye/thin_extensions.rb', line 66

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