Class: StompOut::Parser
- Inherits:
-
Object
- Object
- StompOut::Parser
- Defined in:
- lib/stomp_out/parser.rb
Overview
Parser for converting stream of data from connection into STOMP frames
Instance Method Summary collapse
-
#<<(buf) ⇒ TrueClass
Add data received from connection to end of buffer.
-
#initialize ⇒ Parser
constructor
Create frame parser.
-
#next ⇒ Frame, NilClass
Get next frame.
Constructor Details
Instance Method Details
#<<(buf) ⇒ TrueClass
Add data received from connection to end of buffer
41 42 43 44 |
# File 'lib/stomp_out/parser.rb', line 41 def <<(buf) @buffer << buf parse end |
#next ⇒ Frame, NilClass
Get next frame
49 50 51 |
# File 'lib/stomp_out/parser.rb', line 49 def next @frames.shift end |