# groonga - An open-source fulltext search engine and column store.

- 日本語

# 7.3.52. `ruby_load`

## 7.3.52.1. Summary

`ruby_load` command loads specified Ruby script.

## 7.3.52.2. Syntax

This command takes only one required parameter:

    ruby_load path

## 7.3.52.3. Usage

You can load any script file which mruby supports by calling `ruby_load`.

Here is an example that just load `expression.rb` as Ruby script.

Execution example:

    plugin_register ruby/load
    # [[0, 1337566253.89858, 0.000355720520019531], true]
    ruby_load "expression.rb"
    # [[0, 1337566253.89858, 0.000355720520019531], {"value": null}]

Register `ruby/load` plugin to use `ruby_load` command in advance.

Note that `ruby_load` is implemented as an experimental plugin, and the specification may be changed in the future.

## 7.3.52.4. Parameters

This section describes all parameters.

### 7.3.52.4.1. `path`

Specifies the Ruby script path which you want to load.

## 7.3.52.5. Return value

`ruby_load` returns the loaded result with metadata such as exception information (Including metadata isn't implemented yet):

    [HEADER, {"value": LOADED_VALUE}]

`HEADER`

> See Output format about `HEADER`.

`LOADED_VALUE`

> `LOADED_VALUE` is the loaded value of ruby script.

> `ruby_load` just return `null` as `LOADED_VALUE` for now, it will be supported in the future.

## 7.3.52.6. See also

ruby_eval