/** * Retrieves ARGV from Ruby after the evaluation or method invocation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved constants. */ public static void retrieve(final RubyObject receiver, final BiVariableMap vars) { if ( vars.isLazy() ) return; updateARGV(receiver, vars); }
/** * Retrieves ARGV from Ruby after the evaluation or method invocation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved constants. */ public static void retrieve(final RubyObject receiver, final BiVariableMap vars) { if ( vars.isLazy() ) return; updateARGV(receiver, vars); }
/** * Retrieves ARGV from Ruby after the evaluation or method invocation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved constants. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; updateARGV(receiver, vars); }
/** * Retrieves ARGV from Ruby after the evaluation or method invocation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved constants. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; updateARGV(receiver, vars); }
/** * Retrieves instance variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved instance variables. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; updateInstanceVar(receiver, vars); updateInstanceVar(getTopSelf(receiver), vars); }
/** * Retrieves instance variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved instance variables. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; updateInstanceVar(receiver, vars); updateInstanceVar(getTopSelf(receiver), vars); }
/** * Retrieves class variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved class variables. */ public static void retrieve(final RubyObject receiver, final BiVariableMap vars) { if ( vars.isLazy() ) return; // trying to get variables from receiver; updateClassVar(receiver, vars); // trying to get variables from topself. updateClassVar(getTopSelf(receiver), vars); }
/** * Retrieves class variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved class variables. */ public static void retrieve(final RubyObject receiver, final BiVariableMap vars) { if ( vars.isLazy() ) return; // trying to get variables from receiver; updateClassVar(receiver, vars); // trying to get variables from topself. updateClassVar(getTopSelf(receiver), vars); }
/** * Retrieves instance variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved instance variables. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; updateInstanceVar(receiver, vars); updateInstanceVar((RubyObject)receiver.getRuntime().getTopSelf(), vars); }
/** * Retrieves instance variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved instance variables. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; updateInstanceVar(receiver, vars); updateInstanceVar((RubyObject)receiver.getRuntime().getTopSelf(), vars); }
/** * Retrieves constants from Ruby after the evaluation or method invocation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved constants. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; // user defined constants of top level go to a super class updateConstantsOfSuperClass(receiver, vars); // Constants might have the same names but different receivers. updateConstants(receiver, vars); updateConstants(getTopSelf(receiver), vars); }
/** * Retrieves class variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved class variables. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; // trying to get variables from receiver; updateClassVar(receiver, vars); // trying to get variables from topself. RubyObject topSelf = (RubyObject) receiver.getRuntime().getTopSelf(); updateClassVar(topSelf, vars); }
/** * Retrieves constants from Ruby after the evaluation or method invocation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved constants. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; // user defined constants of top level go to a super class updateConstantsOfSuperClass(receiver, vars); // Constants might have the same names but different receivers. updateConstants(receiver, vars); updateConstants(getTopSelf(receiver), vars); }
/** * Retrieves class variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved class variables. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; // trying to get variables from receiver; updateClassVar(receiver, vars); // trying to get variables from topself. RubyObject topSelf = (RubyObject) receiver.getRuntime().getTopSelf(); updateClassVar(topSelf, vars); }
/** * Retrieves constants from Ruby after the evaluation or method invocation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved constants. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; // user defined constants of top level go to a super class updateConstantsOfSuperClass(receiver, vars); // Constants might have the same names but different receivers. updateConstants(receiver, vars); RubyObject topSelf = (RubyObject)receiver.getRuntime().getTopSelf(); updateConstants(topSelf, vars); }
/** * Retrieves constants from Ruby after the evaluation or method invocation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved constants. */ public static void retrieve(RubyObject receiver, BiVariableMap vars) { if (vars.isLazy()) return; // user defined constants of top level go to a super class updateConstantsOfSuperClass(receiver, vars); // Constants might have the same names but different receivers. updateConstants(receiver, vars); RubyObject topSelf = (RubyObject)receiver.getRuntime().getTopSelf(); updateConstants(topSelf, vars); }
/** * Retrieves global variables eagerly from Ruby right after the evaluation. The * variable names to be retrieved must be in a variable map. * * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved global variables. */ public static void retrieve(final RubyObject receiver, final BiVariableMap vars) { if ( vars.isLazy() ) return; final GlobalVariables globalVars = receiver.getRuntime().getGlobalVariables(); for ( final String name : globalVars.getNames() ) { if ( isPredefined(name) ) continue; final IRubyObject value = globalVars.get(name); String javaName = name.substring(1); // eliminates a preceding character, "$" updateLocalGlobal(getTopSelf(receiver), vars, javaName, value); } }
/** * Retrieves global variables eagerly from Ruby right after the evaluation. The * variable names to be retrieved must be in a variable map. * * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved global variables. */ public static void retrieve(final RubyObject receiver, final BiVariableMap vars) { if ( vars.isLazy() ) return; final GlobalVariables globalVars = receiver.getRuntime().getGlobalVariables(); for ( final String name : globalVars.getNames() ) { if ( isPredefined(name) ) continue; final IRubyObject value = globalVars.get(name); String javaName = name.substring(1); // eliminates a preceding character, "$" updateLocalGlobal(getTopSelf(receiver), vars, javaName, value); } }
/** * Retrieves global variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved global variables. */ public static void retrieve(IRubyObject receiver, BiVariableMap vars) { if ( vars.isLazy() ) return; GlobalVariables globalVars = receiver.getRuntime().getGlobalVariables(); for ( final String name : globalVars.getNames() ) { if ( isPredefined(name) ) continue; IRubyObject value = globalVars.get(name); // receiver of gvar should to topSelf always updateGlobalVar(vars, getTopSelf(receiver), name, value); } }
/** * Retrieves global variables from Ruby after the evaluation. * * @param runtime Ruby runtime * @param receiver receiver object returned when a script is evaluated. * @param vars map to save retrieved global variables. */ public static void retrieve(IRubyObject receiver, BiVariableMap vars) { if ( vars.isLazy() ) return; GlobalVariables globalVars = receiver.getRuntime().getGlobalVariables(); for ( final String name : globalVars.getNames() ) { if ( isPredefined(name) ) continue; IRubyObject value = globalVars.get(name); // receiver of gvar should to topSelf always updateGlobalVar(vars, getTopSelf(receiver), name, value); } }