Class: DataMapper::Model::DescendantSet

Class | DataMapper::Model::DescendantSet
In: | lib/dm-core/model/descendant_set.rb
Parent: | Object

### Methods

<< delete each new to_ary

### Included Modules

Enumerable

### Public Class methods

new(model = nil, ancestors = nil)

Initialize a DescendantSet instance

@param [Model] model

      the base model

@param [DescendantSet] ancestors

      the ancestors to notify when a descendant is added

@api private

### Public Instance methods

<<(model)

Append a model as a descendant

@param [Model] model

      the descendant model

@return [DescendantSet]

      self

@api private

delete(model)

Remove a descendant

Also removed the descendant from the ancestors.

@param [Model] model

      the model to remove

@return [Model, NilClass]

      the model is return if it is a descendant

@api private

each() {|model| ...}

Iterate over each descendant

@yield [model]

      iterate over each descendant

@yieldparam [Model] model

      the descendant model

@return [DescendantSet]

      self

@api private

to_ary()

Return an Array representation of descendants

@return [Array]

      the descendants

@api private

[Validate]