dfhack/docs/plugins/ruby.rst

24 lines
385 B
ReStructuredText

.. _rb:
ruby
====
**Tags:** `tag/dev`
2022-07-31 14:28:01 -06:00
: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.