Beispiel #1
0
        protected object /*!*/ DefineSingleton(Action <RubyModule> instanceTrait, Action <RubyModule> classTrait, RubyModule[] /*!*/ mixins)
        {
            Assert.NotNullItems(mixins);
            Debug.Assert(_context.ObjectClass != null);

            object    result    = new object();
            RubyClass singleton = _context.CreateInstanceSingleton(result, instanceTrait, classTrait);

            singleton.SetMixins(mixins);

            return(result);
        }