yard-sd

Note: This README and the example are best viewed on http://doc.fork-bomb.org/yard-sd/ or a service supporting the yard-sd plugin.

Description

yard-sd allows embedding sequence diagrams directly in docstrings and files. During documentation generation, it replaces the text description with images.

Requirements

yard-sd needs YARD 0.7.5/0.8.0 to function properly.

Furthermore, yard-sd needs the following binaries:

  • pdflatex
  • convert (from the ImageMagick suite)
  • gs (Ghostscript, needed by convert)

Installation

$ gem install yard-sd

Usage

yard-sd defines a new language for code blocks called "sd". Like other languages, it can be used with the tripple-bang syntax (!!!LANG).

Example

Input

!!!sd
% size = 400

thread Alice
participant[2] Bob
participant[2] Eve

Alice -> Bob: Some message
Bob   -> Eve: Another message
Eve  --> Bob: Return value
noreturn

Output

Error: ["No such file or directory - pdflatex", ["/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `popen'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `block in to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `chdir'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:30:in `html_syntax_highlight_sd'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:170:in `html_syntax_highlight'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:593:in `block in parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `gsub'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:48:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:5:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:65:in `diskfile'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `block in yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:400:in `with_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/layout.erb:23:in `_erb_cache_0'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:279:in `erb'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:60:in `layout'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:135:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/engine.rb:88:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:143:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/display_file_command.rb:23:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:95:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/library_command.rb:65:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:135:in `route_docs'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:110:in `route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:54:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/rack_adapter.rb:51:in `call'", "/home/app/rubydoc.info/app.rb:342:in `block in <class:DocServer>'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `block in compile!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'", "/home/app/rubydoc.info/app.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/rack_patch.rb:13:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:205:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/configuration.rb:71:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:490:in `handle_request'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:361:in `process_client'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:254:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'"]]

The format

A sequence diagram consists of two parts: the metadata (currently only the size) and the actual description of the diagram's content.

Metadata

The only currently supported and required metadata is the size of the diagram. You can either specify only a width (e.g. 500), only a height (e.g. x500) or both (e.g. 500x500). In most cases it makes sense to specify only one of the dimensions so the aspect ratio can be kept.

Content

The content itself can also be separated into two parts: The list of threads/participants (simply called participants from now on) and the messages between those.

Participants

In their most basic form, they consist of a type (thread or participant) and a name.

Example:

thread Alice
participant Bob

Output:

Error: ["No such file or directory - pdflatex", ["/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `popen'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `block in to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `chdir'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:30:in `html_syntax_highlight_sd'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:170:in `html_syntax_highlight'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:593:in `block in parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `gsub'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:48:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:5:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:65:in `diskfile'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `block in yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:400:in `with_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/layout.erb:23:in `_erb_cache_0'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:279:in `erb'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:60:in `layout'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:135:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/engine.rb:88:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:143:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/display_file_command.rb:23:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:95:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/library_command.rb:65:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:135:in `route_docs'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:110:in `route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:54:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/rack_adapter.rb:51:in `call'", "/home/app/rubydoc.info/app.rb:342:in `block in <class:DocServer>'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `block in compile!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'", "/home/app/rubydoc.info/app.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/rack_patch.rb:13:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:205:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/configuration.rb:71:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:490:in `handle_request'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:361:in `process_client'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:254:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'"]]

It is also possible to specify the distance to the previous participant by adding a number in square brackets. The default is 0, so 1 will double the distance, 2 will triple it and so on.

Example:

thread Alice
participant[1] Bob

Output:

Error: ["No such file or directory - pdflatex", ["/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `popen'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `block in to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `chdir'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:30:in `html_syntax_highlight_sd'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:170:in `html_syntax_highlight'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:593:in `block in parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `gsub'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:48:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:5:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:65:in `diskfile'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `block in yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:400:in `with_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/layout.erb:23:in `_erb_cache_0'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:279:in `erb'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:60:in `layout'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:135:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/engine.rb:88:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:143:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/display_file_command.rb:23:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:95:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/library_command.rb:65:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:135:in `route_docs'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:110:in `route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:54:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/rack_adapter.rb:51:in `call'", "/home/app/rubydoc.info/app.rb:342:in `block in <class:DocServer>'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `block in compile!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'", "/home/app/rubydoc.info/app.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/rack_patch.rb:13:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:205:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/configuration.rb:71:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:490:in `handle_request'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:361:in `process_client'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:254:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'"]]

Finally, it is also possible to assign aliases to avoid typing out long names over and over again.

Example:

participant "Alice, the wonderful girl" as Alice
participant Bob

Alice -> Bob: Yey

Output:

Error: ["No such file or directory - pdflatex", ["/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `popen'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `block in to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `chdir'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:30:in `html_syntax_highlight_sd'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:170:in `html_syntax_highlight'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:593:in `block in parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `gsub'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:48:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:5:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:65:in `diskfile'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `block in yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:400:in `with_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/layout.erb:23:in `_erb_cache_0'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:279:in `erb'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:60:in `layout'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:135:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/engine.rb:88:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:143:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/display_file_command.rb:23:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:95:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/library_command.rb:65:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:135:in `route_docs'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:110:in `route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:54:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/rack_adapter.rb:51:in `call'", "/home/app/rubydoc.info/app.rb:342:in `block in <class:DocServer>'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `block in compile!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'", "/home/app/rubydoc.info/app.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/rack_patch.rb:13:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:205:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/configuration.rb:71:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:490:in `handle_request'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:361:in `process_client'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:254:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'"]]

Messages

The second part of description of the sequende diagram consists of messages between participants. Messages are denoted by an arrow and text (p1 -> p2: The message) while return values are denoted by a dashed arrow and also text (p2 --> p1: The return value). If a message has no return value, a noreturn has to be placed after the execution finished.

Example:

Alice -> Bob: Some message
Bob   -> Eve: Another message
Eve  --> Bob: Return value
noreturn

Output:

Error: ["No such file or directory - pdflatex", ["/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `popen'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `block in to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `chdir'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:30:in `html_syntax_highlight_sd'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:170:in `html_syntax_highlight'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:593:in `block in parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `gsub'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:48:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:5:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:65:in `diskfile'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `block in yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:400:in `with_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/layout.erb:23:in `_erb_cache_0'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:279:in `erb'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:60:in `layout'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:135:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/engine.rb:88:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:143:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/display_file_command.rb:23:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:95:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/library_command.rb:65:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:135:in `route_docs'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:110:in `route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:54:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/rack_adapter.rb:51:in `call'", "/home/app/rubydoc.info/app.rb:342:in `block in <class:DocServer>'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `block in compile!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'", "/home/app/rubydoc.info/app.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/rack_patch.rb:13:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:205:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/configuration.rb:71:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:490:in `handle_request'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:361:in `process_client'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:254:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'"]]

Blocks

Furthermore, it is possible to group messages into blocks, for example for representing loops:

Example:

block "Name" "Description"
  Alice -> Bob: Msg1
  Bob --> Alice: Ret1

  block "Another name" "Nested blocks, yey"
    Alice -> Bob: Msg2
    noreturn

Alice -> Bob: Msg3
Bob --> Alice: Ret3

Output:

Error: ["No such file or directory - pdflatex", ["/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `popen'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:142:in `block in to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `chdir'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram/diagram.rb:140:in `to_png'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:30:in `html_syntax_highlight_sd'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:170:in `html_syntax_highlight'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:593:in `block in parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `gsub'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:586:in `parse_codeblocks'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/helpers/html_helper.rb:48:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/yard-sd-0.0.4/lib/yard-sd/sequence_diagram_mixin.rb:5:in `htmlify'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:65:in `diskfile'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `block in yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:400:in `with_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:269:in `yieldall'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/layout.erb:23:in `_erb_cache_0'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:279:in `erb'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/templates/default/layout/html/setup.rb:60:in `layout'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:355:in `render_section'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:251:in `block (2 levels) in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:248:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:386:in `add_options'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:247:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/template.rb:135:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/templates/engine.rb:88:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:143:in `render'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/display_file_command.rb:23:in `run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/base.rb:95:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/commands/library_command.rb:65:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:135:in `route_docs'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:110:in `route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/router.rb:54:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/bundler/gems/yard-462a42d788fe/lib/yard/server/rack_adapter.rb:51:in `call'", "/home/app/rubydoc.info/app.rb:342:in `block in <class:DocServer>'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `block in compile!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'", "/home/app/rubydoc.info/app.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/rack_patch.rb:13:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:205:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1724:in `synchronize'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/configuration.rb:71:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:490:in `handle_request'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:361:in `process_client'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/server.rb:254:in `block in run'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `call'", "/home/app/rubydoc.info/vendor/bundle/ruby/2.1.0/gems/puma-2.8.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'"]]

Blocks automatically get closed, based on the indentation level.

More information

For a more advanced example, see Example.md.

Caveats

yard-sd currently does not support Unicode.