How do I use Ropes?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How do I use Ropes?

Hannes Hirzel
Ken

I think I need a bit more instructions how the class Rope [1] is
supposed to be used.

The test class #RopeTest has


   setUp

        "Set up class variables (before each test)."
        "This could be done once, as Ropes are immutable"
        | testString |
        testString := '1234abcd5678hijk90lm'.
        flatRope := FlatRope fromString: testString.
        "Build SubRope by hand as we need to test constructor"
        subRope := SubRope new initialize string: testString startIndex: 5 length: 12.
        concRope1 := ConcatRope concatenate: subRope with: (' new string tail' asRope).
        concRope2 := ConcatRope concatenate: concRope1 with:concRope1.
        concRope3 := ConcatRope concatenate: ('Now is the time ' asRope) with: subRope.


I actually would expect the class Rope to have
    Rope class >> fromString:

as I do not necessarily want to know about the details.

--Hannes


[1]  https://github.com/KenDickey/Cuis-Ropes

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org