IronRuby.Builtins.RubyModule.MakeNestedModuleName C# (CSharp) 메소드

MakeNestedModuleName() 공개 메소드

public MakeNestedModuleName ( string nestedModuleSimpleName ) : string
nestedModuleSimpleName string
리턴 string
        public string/*!*/ MakeNestedModuleName(string nestedModuleSimpleName) {
            return (IsObjectClass || nestedModuleSimpleName == null) ?
                nestedModuleSimpleName :
                _name + "::" + nestedModuleSimpleName;
        }

Usage Example

예제 #1
0
        public static void SetConstant(RubyModule/*!*/ owner, string/*!*/ name, object value) {
            Assert.NotNull(owner, name);

            if (owner.SetConstantChecked(name, value)) {
                owner.Context.ReportWarning(String.Format("already initialized constant {0}", name));
            }

            // Initializes anonymous module's name:
            RubyModule module = value as RubyModule;
            if (module != null && module.Name == null) {
                module.Name = owner.MakeNestedModuleName(name);
            }
        }
RubyModule