Method: FTW::WebSocket#each
- Defined in:
- lib/ftw/websocket.rb
#each(&block) ⇒ Object
Iterate over each WebSocket message. This method will run forever unless you break from it.
The text payload of each message will be yielded to the block.
121 122 123 124 125 |
# File 'lib/ftw/websocket.rb', line 121 def each(&block) while true block.call(receive) end end |