dfhack/docs/plugins/ruby.rst

24 lines
385 B
ReStructuredText

.. _rb:
ruby
====
**Tags:** `tag/dev`
:dfhack-keybind:`rb`
:dfhack-keybind:`rb_eval`
Allow Ruby scripts to be executed. When invoked as a command, you can Eval() a
ruby string.
Usage::
enable ruby
rb "ruby expression"
rb_eval "ruby expression"
:rb ruby expression
Example
-------
``:rb puts df.unit_find(:selected).name``
Print the name of the selected unit.