def docopt
      width = detect_terminal_size[0]
      doc = []
      doc << (@version ? "#{@name} #{@version}" : "#{@name}")
      doc << "#{@summary}" if @summary
      doc += docopt_usage
      doc += docopt_commands width
      doc += docopt_options width
      doc += docopt_params width
      doc += docopt_examples width
      doc.join "\n"
    end
def docopt
      width = detect_terminal_size[0]
      doc = []
      doc << (@version ? "#{@name} #{@version}" : "#{@name}")
      doc << "#{@summary}" if @summary
      doc += docopt_usage
      doc += docopt_commands width
      doc += docopt_options width
      doc += docopt_params width
      doc += docopt_examples width
      doc.join "\n"
    end
The constructor expects to an object that responds to all the
 textual details needed to generate a docopt document (name, version,
 summary, options) and an array of Action objects.
 The superspace argument will be the name of runfile, in case we
 are running a named.runfile. It is only needed to generate the
 proper `run superspace (-h|--help|--version)` line
 Generate a document based on all the actions, help messages
 and options we have collected from the Runfile DSL.