<html>
  <head>
    <script src="../../bower_components/opal/opal/current/opal.js"></script>
    <script src="../../dist/asciidoctor-core.js"></script>
  </head>
  <body>
    <script>
      var content = "http://asciidoctor.org[*Asciidoctor*] " +
        "running on http://opalrb.org[_Opal_] " +
        "brings AsciiDoc to the browser!";
      var options = Opal.hash2(['doctype', 'attributes'], {doctype: 'inline', attributes: ['showtitle']});
      Opal.require('asciidoctor');
      var html = Opal.Asciidoctor.$convert(content, options);
      console.log('html', html);
    </script>
  </body>
</html>



<html>
  <head>
    <script src="../../bower_components/opal/opal/current/opal.js"></script>
    <script src="../../dist/asciidoctor-core.js"></script>
  </head>
  <body>
    <script>
      var content = "http://asciidoctor.org[*Asciidoctor*] " +
        "running on http://opalrb.org[_Opal_] " +
        "brings AsciiDoc to the browser!";
      var options = Opal.hash({doctype: 'inline', attributes: ['showtitle']});
      Opal.require('asciidoctor');
      var html = Opal.Asciidoctor.$convert(content, options);
      console.log('html', html);
    </script>
  </body>
</html>



Use hash instead of hash2 (readability)
Use hash instead of hash2 (readability)