Class: Tapout::AbstractParser
- Inherits:
-
Object
- Object
- Tapout::AbstractParser
- Defined in:
- lib/tapout/parsers/abstract.rb
Direct Known Subclasses
Constant Summary collapse
- PAUSE_DOCUMENT =
ASCII DLE (Data Link Escape)
16.chr + "\n"
- RESUME_DOCUMENT =
ASCII ETB (End of Transmission Block)
23.chr + "\n"
Instance Method Summary collapse
-
#passthru(doc = nil) ⇒ Object
Passthru incoming data directly to ‘$stdout`.
Instance Method Details
#passthru(doc = nil) ⇒ Object
Passthru incoming data directly to ‘$stdout`.
15 16 17 18 19 20 21 22 |
# File 'lib/tapout/parsers/abstract.rb', line 15 def passthru(doc=nil) $stdout << doc if doc while line = @input.gets return line if RESUME_DOCUMENT === line $stdout << line end return '' end |