C
Caleb Clausen
Sequence version 0.1.0 has been released!
http://rubyforge.org/projects/sequence
http://sequence.rubyforge.org/
Sequence is a wrapper api for accessing data in Strings, Arrays,
Files, IOs, and Enumerations. Each sequence encapsulates some
data and a current position within it. There are methods for
moving the position, reading and writing data(with or without
moving the position) forward or backward from the current
position (or anywhere at all), scanning for patterns (like
StringScanner, but it works in Files too, among others), and
saving a position that will remain valid even after data is
deleted or inserted elsewhere within the sequence.
There are also some utility classes for making sequences reversed
or circular, turning one-way sequences into two-way, buffering,
and making sequences that are subsets or aggregations of existing
sequences.
Sequence is based on Eric Mahurin's Cursor library. I'd like to
thank Eric for Cursor, without which Sequence would not have
existed; my design is very much a derivative of his.
known problems:
Some unit tests fail
Buffered does not work at all
Shifting's modify methods don't work reliably
Some write operations failing for List
No unit tests at all for array-like sequences
(tho Reg's unit test does test OfArray at least somewhat...)
http://rubyforge.org/projects/sequence
http://sequence.rubyforge.org/
Sequence is a wrapper api for accessing data in Strings, Arrays,
Files, IOs, and Enumerations. Each sequence encapsulates some
data and a current position within it. There are methods for
moving the position, reading and writing data(with or without
moving the position) forward or backward from the current
position (or anywhere at all), scanning for patterns (like
StringScanner, but it works in Files too, among others), and
saving a position that will remain valid even after data is
deleted or inserted elsewhere within the sequence.
There are also some utility classes for making sequences reversed
or circular, turning one-way sequences into two-way, buffering,
and making sequences that are subsets or aggregations of existing
sequences.
Sequence is based on Eric Mahurin's Cursor library. I'd like to
thank Eric for Cursor, without which Sequence would not have
existed; my design is very much a derivative of his.
known problems:
Some unit tests fail
Buffered does not work at all
Shifting's modify methods don't work reliably
Some write operations failing for List
No unit tests at all for array-like sequences
(tho Reg's unit test does test OfArray at least somewhat...)