I'm planning on moving into coding around the input from serial devices soon and was quite happy to find [Ruby-serialport](http://ruby-serialport.rubyforge.org/). The API looks easy to use, but I'm a bit confused on how to take an event-based approach towards receiving data.

I want to do something on data whenever a `\n` appears, but the current read() in the library appears to just dump whatever is on the screen. What I'm really looking for is a way to tigger a function it when new data comes in.