Initialize a DescendantSet instance
@param [#] descendants
initialize with the descendants
@api private
# File lib/dm-core/support/descendant_set.rb, line 11 11: def initialize(descendants = []) 12: @descendants = SubjectSet.new(descendants) 13: end
Add a descendant
@param [Module] descendant
@return [DescendantSet]
self
@api private
# File lib/dm-core/support/descendant_set.rb, line 33 33: def <<(descendant) 34: @descendants << descendant 35: self 36: end
Removes all entries and returns self
@return [DescendantSet] self
@api private
# File lib/dm-core/support/descendant_set.rb, line 84 84: def clear 85: @descendants.clear 86: end
Remove a descendant
Also removes from all descendants
@param [Module] descendant
@return [DescendantSet]
self
@api private
# File lib/dm-core/support/descendant_set.rb, line 48 48: def delete(descendant) 49: @descendants.delete(descendant) 50: each { |d| d.descendants.delete(descendant) } 51: end
Iterate over each descendant
@yield [descendant] @yieldparam [Module] descendant
@return [DescendantSet]
self
@api private
# File lib/dm-core/support/descendant_set.rb, line 62 62: def each 63: @descendants.each do |descendant| 64: yield descendant 65: descendant.descendants.each { |dd| yield dd } 66: end 67: self 68: end
Test if there are any descendants
@return [Boolean]
@api private
# File lib/dm-core/support/descendant_set.rb, line 75 75: def empty? 76: @descendants.empty? 77: end
Copy a DescendantSet instance
@param [DescendantSet] original
the original descendants
@api private
# File lib/dm-core/support/descendant_set.rb, line 21 21: def initialize_copy(original) 22: @descendants = @descendants.dup 23: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.