コード例 #1
0
        protected RubyModule /*!*/ DefineGlobalModule(string /*!*/ name, Type /*!*/ type, Action <RubyModule> instanceTrait,
                                                      Action <RubyModule> classTrait, RubyModule[] /*!*/ mixins)
        {
            RubyModule module = _context.DefineLibraryModule(name, type, instanceTrait, classTrait, mixins);

            _context.ObjectClass.SetConstant(module.Name, module);
            return(module);
        }
コード例 #2
0
        protected RubyModule /*!*/ DefineGlobalModule(string /*!*/ name, Type /*!*/ type, int restrictions,
                                                      Action <RubyModule> instanceTrait, Action <RubyModule> classTrait, Action <RubyModule> constantsInitializer,
                                                      RubyModule /*!*/[] /*!*/ mixins)
        {
            RubyModule result = _context.DefineLibraryModule(name, type, instanceTrait, classTrait, constantsInitializer, mixins, (ModuleRestrictions)restrictions, _builtin);

            PublishModule(name, result);
            return(result);
        }