colorful rat Ratfactor.com > Dave's Repos

rubylit

A literate programming system in 35 lines of Ruby
git clone http://ratfactor.com/repos/rubylit/rubylit.git

rubylit/hello-segments.md

Download raw file: hello-segments.md

1 # Hello Segments! 2 3 This one has stuff defined out of order in a silly way so we can 4 demonstrate segments. 5 6 Right now we're in the start segment. The <<hello>> thingy will 7 request that we "include" the hello segment defined after: 8 9 <<Hello>> 10 puts "World!" 11 12 ## Hello 13 14 This segment will actually run first because it's included at the 15 beginning of the unnamed start segment above. 16 17 puts "Hello..." 18 19 This example is obviously nonsense. But it should demonstrate the 20 principle nicely.