C# Class IronRuby.RubyHostingExtensions

Show file Open project: jschementi/iron

Public Methods

Method Description
AddRubySetup ( this runtimeSetup ) : LanguageSetup

Adds a new IronRuby setup into the runtime setup unless already included.

AddRubySetup ( this runtimeSetup, Action newSetupInitializer ) : LanguageSetup

Adds a new IronRuby setup into the given runtime setup unless already included.

GetRubyEngine ( this runtime ) : ScriptEngine

Retrieves an IronRuby engine from this script runtime.

GetRubySetup ( this runtimeSetup ) : LanguageSetup

Retrieves IronRuby setup from the script runtime setup.

RequireFile ( this engine, string path ) : bool

Loads a script file using the semantics of Kernel#require method.

If a relative path is given the current search paths are used to locate the script file. The current search paths could be read and modified via ScriptEngine.GetSearchPaths and ScriptEngine.SetSearchPaths, respectively.

RequireFile ( this engine, string path, ScriptScope scope ) : bool

Loads a script file using the semantics of Kernel#require method. The script is executed within the context of a given ScriptScope.

If a relative path is given the current search paths are used to locate the script file. The current search paths could be read and modified via ScriptEngine.GetSearchPaths and ScriptEngine.SetSearchPaths, respectively.

Method Details

AddRubySetup() public static method

Adds a new IronRuby setup into the runtime setup unless already included.
public static AddRubySetup ( this runtimeSetup ) : LanguageSetup
runtimeSetup this The to update.
return LanguageSetup

AddRubySetup() public static method

Adds a new IronRuby setup into the given runtime setup unless already included.
public static AddRubySetup ( this runtimeSetup, Action newSetupInitializer ) : LanguageSetup
runtimeSetup this The to update.
newSetupInitializer Action /// If not null, is used to initialize the new IronRuby . ///
return LanguageSetup

GetRubyEngine() public static method

Retrieves an IronRuby engine from this script runtime.
/// The is not set up to run IronRuby. /// The doesn't contain IronRuby's . ///
public static GetRubyEngine ( this runtime ) : ScriptEngine
runtime this The runtime to get the engine from.
return ScriptEngine

GetRubySetup() public static method

Retrieves IronRuby setup from the script runtime setup.
public static GetRubySetup ( this runtimeSetup ) : LanguageSetup
runtimeSetup this Runtime setup.
return LanguageSetup

RequireFile() public static method

Loads a script file using the semantics of Kernel#require method.
If a relative path is given the current search paths are used to locate the script file. The current search paths could be read and modified via ScriptEngine.GetSearchPaths and ScriptEngine.SetSearchPaths, respectively.
public static RequireFile ( this engine, string path ) : bool
engine this The Ruby engine.
path string The path to the file to load.
return bool

RequireFile() public static method

Loads a script file using the semantics of Kernel#require method. The script is executed within the context of a given ScriptScope.
If a relative path is given the current search paths are used to locate the script file. The current search paths could be read and modified via ScriptEngine.GetSearchPaths and ScriptEngine.SetSearchPaths, respectively.
public static RequireFile ( this engine, string path, ScriptScope scope ) : bool
engine this The Ruby engine.
path string The path to the file to load.
scope ScriptScope The scope to use for the script execution.
return bool