Class: TestLineText2::Multichar
- Inherits:
-
Object
- Object
- TestLineText2::Multichar
- Includes:
- EM::Protocols::LineText2
- Defined in:
- lib/ext/eventmachine-0.12.10/tests/test_ltp2.rb
Overview
Test multi-character line delimiters. Also note that the test data has a “tail” with no delimiter, that will be discarded, but cf. the BinaryTail test. TODO!!! This test doesn’t work in the byte-by-byte case.
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Multichar
constructor
A new instance of Multichar.
- #receive_line(ln) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Multichar
Returns a new instance of Multichar.
206 207 208 209 210 |
# File 'lib/ext/eventmachine-0.12.10/tests/test_ltp2.rb', line 206 def initialize *args super @lines = [] set_delimiter "012" end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
205 206 207 |
# File 'lib/ext/eventmachine-0.12.10/tests/test_ltp2.rb', line 205 def lines @lines end |
Instance Method Details
#receive_line(ln) ⇒ Object
211 212 213 |
# File 'lib/ext/eventmachine-0.12.10/tests/test_ltp2.rb', line 211 def receive_line ln @lines << ln end |