Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddu_vim/deps.ts>fn.rubyeval

Dark deno-powered UI framework for neovim/Vim8
Go to Latest
function fn.rubyeval
import { fn } from "https://deno.land/x/ddu_vim@v1.13.0/deps.ts";
const { rubyeval } = fn;

Evaluate Ruby expression {expr} and return its result converted to Vim data structures. Numbers, floats and strings are returned as they are (strings are copied though). Arrays are represented as Vim |List| type. Hashes are represented as Vim |Dictionary| type. Other objects are represented as strings resulted from their "Object#to_s" method. Note that in a :def function local variables are not visible to {expr}. Can also be used as a |method|: GetRubyExpr()->rubyeval() {only available when compiled with the |+ruby| feature}

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>