本文整理汇总了C#中IronRuby.Runtime.RubyScope.GetInnerMostModule方法的典型用法代码示例。如果您正苦于以下问题:C# RubyScope.GetInnerMostModule方法的具体用法?C# RubyScope.GetInnerMostModule怎么用?C# RubyScope.GetInnerMostModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IronRuby.Runtime.RubyScope
的用法示例。
在下文中一共展示了RubyScope.GetInnerMostModule方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetAutoloadedConstant
public static void SetAutoloadedConstant(RubyScope/*!*/ scope, object self,
[DefaultProtocol, NotNull]string/*!*/ constantName, [DefaultProtocol, NotNull]MutableString/*!*/ path) {
ModuleOps.SetAutoloadedConstant(scope.GetInnerMostModule(), constantName, path);
}
示例2: GetAutoloadedConstantPath
public static MutableString GetAutoloadedConstantPath(RubyScope/*!*/ scope, object self, [DefaultProtocol, NotNull]string/*!*/ constantName) {
return ModuleOps.GetAutoloadedConstantPath(scope.GetInnerMostModule(), constantName);
}
示例3: DefineNestedClass
public static RubyModule/*!*/ DefineNestedClass(RubyScope/*!*/ scope, string/*!*/ name, object superClassObject) {
return RubyUtils.DefineClass(scope.GlobalScope, scope.GetInnerMostModule(), name, superClassObject);
}
示例4: SetUnqualifiedConstant
[Emitted] // ConstantVariable:
public static object SetUnqualifiedConstant(object value, RubyScope/*!*/ scope, string/*!*/ name) {
RubyUtils.SetConstant(scope.GetInnerMostModule(), name, value);
return value;
}
示例5: UndefineMethod
[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);
}
示例6: DefineNestedModule
public static RubyModule/*!*/ DefineNestedModule(RubyScope/*!*/ scope, string/*!*/ name) {
return RubyUtils.DefineModule(scope.GlobalScope, scope.GetInnerMostModule(), name);
}
示例7: SetClassVariable
public static object SetClassVariable(object value, RubyScope/*!*/ scope, string/*!*/ name) {
return SetClassVariableInternal(scope.GetInnerMostModule(true), name, value);
}
示例8: IsDefinedClassVariable
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;
}
示例9: TryGetClassVariable
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;
}
示例10: GetClassVariable
public static object GetClassVariable(RubyScope/*!*/ scope, string/*!*/ name) {
// owner is the first module in scope:
RubyModule owner = scope.GetInnerMostModule(true);
return GetClassVariableInternal(owner, name);
}
示例11: UndefineMethod
[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);
}