Place this script in the parent directory of the Asciidoctor project folder.
Example using built-in templates to output HTML5:
ruby test-asciidoctor.rb samples/test.ad
Example using built-in templates to output DocBook:
ruby test-asciidoctor.rb samples/test.ad docbook45
If you want to use the asciidoctor-backends, checkout that project in the same folder as the script.
Example using Haml templates under the asciidoctor-backends folder.
ruby test-asciidoctor.rb samples/test.ad html5 haml
Example using the Slim templates under the asciidoctor-backends folder.
ruby test-asciidoctor.rb samples/test.ad html5 slim
NOTE: Many of the attributes that are assigned in this script will eventually be initialized by Asciidoctor.