Inspired by Literate CoffeeScript.
$ cat hello.litrb
Here's a simple program
puts "Hello, world"
$ ruby litrb.rb < hello.litrb
Hello, world
Inspired by Literate CoffeeScript.
$ cat hello.litrb
Here's a simple program
puts "Hello, world"
$ ruby litrb.rb < hello.litrb
Hello, world
eval ARGF.readlines.select { |line| line[/^\t/] }.map { |line| line[1..-1] }.join |