/// <summary> /// Loads a given script file using the semantics of Kernel#require method. /// The script is executed within the context of a given <see cref="ScriptScope"/>. /// </summary> /// <param name="engine">The Ruby engine.</param> /// <param name="path">The path to the file to load.</param> /// <param name="scope">The scope to use for the script execution.</param> /// <returns>Whether the file has already been required.</returns> /// <remarks> /// 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 <see cref="ScriptEngine.GetSearchPaths"/> and <see cref="ScriptEngine.SetSearchPaths"/>, /// respectively. /// </remarks> public bool RequireFile(string /*!*/ path, ScriptScope /*!*/ scope) { ContractUtils.RequiresNotNull(path, "path"); ContractUtils.RequiresNotNull(scope, "scope"); return(RequireFile(path, HostingHelpers.GetScope(scope))); }
internal static Scope scope(this ScriptScope aScriptScope) { return(HostingHelpers.GetScope(aScriptScope)); }