Class: TestLineText2::Multichar

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#linesObject (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