Module: IIRC::Reading
- Included in:
- Bot
- Defined in:
- lib/iirc/modules/reading.rb
Instance Method Summary collapse
-
#lines {|String| ... } ⇒ Object
Read lines from #socket in a blocking loop until EOF or an error is raised.
Instance Method Details
#lines {|String| ... } ⇒ Object
Read lines from #socket in a blocking loop until EOF or an error is raised.
6 7 8 9 10 |
# File 'lib/iirc/modules/reading.rb', line 6 def lines loop { yield socket.readline.force_encoding('utf-8').encode } end |