Ruby scripts in XUL files use the Ruby scripting language.
Implementation
Ruby scripts are implemented with the JRuby library. The JRuby library currently implement the Ruby 2.5.7 version. Note that this library allow to install external Ruby gems (see the JRuby documentation to see how to install them).
MIME types
The MIME types supported for Ruby scripts are:
"text/rb"
"text/ruby"
"application/ruby"
"application/x-ruby"
Import declarations
There are two types of import declarations for Ruby:
Class import declarations. For example:
import'java.util.List' def execute(list)return list.size() end
Package import declarations which use the include_package keyword
See also
Scripts: This article presents the usage of scripts in XUL files
Ruby MIME types: This article list the supported MIME types for the scripts