IronRuby.Builtins.RubyModule.CreateSingletonClass C# (CSharp) Метод

CreateSingletonClass() приватный Метод

Create a new singleton class for this module. Doesn't attach this module to it yet, the caller needs to do so.
Thread safe.
private CreateSingletonClass ( RubyClass superClass, Action trait ) : RubyClass
superClass RubyClass
trait Action
Результат RubyClass
        internal RubyClass/*!*/ CreateSingletonClass(RubyClass/*!*/ superClass, Action<RubyModule> trait) {
            // Note that in MRI, member tables of dummy singleton are shared with the class the dummy is singleton for
            // This is obviously an implementation detail leaking to the language and we don't support that.

            // real class object and it's singleton share the tracker:
            TypeTracker tracker = (IsSingletonClass) ? null : _typeTracker;

            // Singleton should have the same restrictions as the module it is singleton for.
            // Reason: We need static methods of builtins (e.g. Object#Equals) not to be exposed under Ruby names (Object#equals).
            // We also want static methods of non-builtins to be visible under both CLR and Ruby names. 
            var result = new RubyClass(
                Context, null, null, this, trait, null, null, superClass, null, tracker, null, false, true, this.Restrictions
            );
#if DEBUG
            result.Version.SetName(result.DebugName);
#endif
            return result;
        }
RubyModule