class Redcarpet::CLI

This class aims at easing the creation of custom binary for your needs. For example, you can add new options or change the existing ones. The parsing is handled by Ruby’s OptionParser. For instance:

class Custom::CLI < Redcarpet::CLI
  def self.options_parser
    super.tap do |opts|
      opts.on("--rainbow") do
        @@options[:rainbow] = true
      end
    end
  end

  def self.render_object
    @@options[:rainbow] ? RainbowRender : super
  end
end