public static void SetAutoloadedConstant(RubyScope/*!*/ scope, object self, [DefaultProtocol, NotNull]string/*!*/ constantName, [DefaultProtocol, NotNull]MutableString/*!*/ path) { ModuleOps.SetAutoloadedConstant(scope.GetInnerMostModule(), constantName, path); }
public static MutableString GetAutoloadedConstantPath(RubyScope/*!*/ scope, object self, [DefaultProtocol, NotNull]string/*!*/ constantName) { return ModuleOps.GetAutoloadedConstantPath(scope.GetInnerMostModule(), constantName); }
public static RubyModule/*!*/ DefineNestedClass(RubyScope/*!*/ scope, string/*!*/ name, object superClassObject) { return RubyUtils.DefineClass(scope.GlobalScope, scope.GetInnerMostModule(), name, superClassObject); }
[Emitted] // ConstantVariable: public static object SetUnqualifiedConstant(object value, RubyScope/*!*/ scope, string/*!*/ name) { RubyUtils.SetConstant(scope.GetInnerMostModule(), name, value); return value; }
[Emitted] // UndefineMethod: public static void UndefineMethod(RubyScope/*!*/ scope, string/*!*/ name) { RubyModule owner = scope.GetInnerMostModule(); if (!owner.ResolveMethod(name, RubyClass.IgnoreVisibility).Found) { throw RubyExceptions.CreateUndefinedMethodError(owner, name); } owner.UndefineMethod(name); }
public static RubyModule/*!*/ DefineNestedModule(RubyScope/*!*/ scope, string/*!*/ name) { return RubyUtils.DefineModule(scope.GlobalScope, scope.GetInnerMostModule(), name); }
public static object SetClassVariable(object value, RubyScope/*!*/ scope, string/*!*/ name) { return SetClassVariableInternal(scope.GetInnerMostModule(true), name, value); }
public static bool IsDefinedClassVariable(RubyScope/*!*/ scope, string/*!*/ name) { // owner is the first module in scope: RubyModule owner = scope.GetInnerMostModule(true); object value; return owner.TryResolveClassVariable(name, out value) != null; }
public static object TryGetClassVariable(RubyScope/*!*/ scope, string/*!*/ name) { object value; // owner is the first module in scope: scope.GetInnerMostModule(true).TryResolveClassVariable(name, out value); return value; }
public static object GetClassVariable(RubyScope/*!*/ scope, string/*!*/ name) { // owner is the first module in scope: RubyModule owner = scope.GetInnerMostModule(true); return GetClassVariableInternal(owner, name); }
[Emitted] // UndefineMethod: public static void UndefineMethod(RubyScope/*!*/ scope, string/*!*/ name) { RubyModule owner = scope.GetInnerMostModule(); if (owner.ResolveMethod(name, true) == null) { throw RubyExceptions.CreateUndefinedMethodError(owner, name); } owner.UndefineMethod(name); }