#!/usr/bin/env ruby require "forwardable" require "optparse" require "bundler/setup" require "grokdown" require "grokdown/document" document_definition = Pathname.glob(".grokdown").find { _1.exist? } load document_definition parser = OptionParser.new parser.on("-e [ruby expression]", "Ruby expression to evaluate after loading the Grokdown document definition") do |value| puts Grokdown.module_eval(value) end parser.parse!