MagicDraw 18.5 Documentation

Skip to end of metadata
Go to start of metadata

Ruby Script Tool enables report templates to evaluate or run Ruby codes from templates and external Ruby files.
The Ruby Tool includes 2 methods:

(i) ‘eval’ method: This method will evaluate Ruby text, and then return the result.
(ii) ‘execute’ method: This method will execute a Ruby file, and then return the result.

Like other Script Tools, the Ruby Script Tool ‘scripttool.jar’ must be installed in the ‘extensions’ folder of the Report Wizard plugin. The same ‘jruby-complete-1.6.3.jar’ of the Automaton plugin is used, so make sure the Automaton plugin is enabled and loaded. For further information about Custom Tools and the installation, see Custom tool.

To import Ruby Script Tool to a template, type the following code:

#import ('ruby', 'com.nomagic.reportwizard.tools.script.RubyScriptTool')
  • No labels