Struct mrusty::Repl [] [src]

pub struct Repl {
    // some fields omitted
}

A struct that exposes an Mruby to a REPL.

Examples

Using GnuReadLine, which requires the gnu-readline feature:

let mruby = Mruby::new();
let repl = Repl::new(mruby);

repl.start(&GnuReadLine);

Methods

impl Repl
[src]

fn new(mruby: MrubyType) -> Repl

Creates a new Repl.

Examples

let mruby = Mruby::new();
let repl = Repl::new(mruby);

fn rename(&mut self, name: &str)

Renames a Repl. The command line will start with {name}>.

Examples

let mruby = Mruby::new();
let mut repl = Repl::new(mruby);

repl.rename("repl");

fn start<E: Display>(&self, read_line: &ReadLine<E>)

Starts a Repl.

Use '\' for multiline statements.

Examples

Using GnuReadLine, which requires the gnu-readline feature:

let mruby = Mruby::new();
let repl = Repl::new(mruby);

repl.start(&GnuReadLine);