IronRuby.Builtins.RubyModule.ForEachAncestor C# (CSharp) Method

ForEachAncestor() private method

private ForEachAncestor ( bool>.Func action ) : bool
action bool>.Func
return 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

Esempio n. 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