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

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

private ForEachAncestor ( bool>.Func action ) : bool
action bool>.Func
Результат bool
        internal virtual bool ForEachAncestor(Func<RubyModule/*!*/, bool>/*!*/ action) {
            Context.RequiresClassHierarchyLock();

            return ForEachDeclaredAncestor(action);
        }

Same methods

RubyModule::ForEachAncestor ( bool inherited, bool>.Func action ) : bool

Usage Example

Пример #1
0
        public static RubyArray /*!*/ GetIncludedModules(RubyModule /*!*/ self)
        {
            RubyArray ancestorModules = new RubyArray();

            self.ForEachAncestor(true, delegate(RubyModule /*!*/ module) {
                if (module != self && !module.IsClass && !ancestorModules.Contains(module))
                {
                    ancestorModules.Add(module);
                }
                return(false);
            });
            return(ancestorModules);
        }
All Usage Examples Of IronRuby.Builtins.RubyModule::ForEachAncestor
RubyModule