Home
Categories
Dictionnary
Download
Project Details
Changes Log
FAQ
License

Ruby scripts



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


Categories: scripts

Copyright 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence