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

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

Append a model as a descendant

@param [Model] model

  the descendant model

@return [DescendantSet]

  self

@api private

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

Iterate over each descendant

@yield [model]

  iterate over each descendant

@yieldparam [Model] model

  the descendant model

@return [DescendantSet]

  self

@api private

Return an Array representation of descendants

@return [Array]

  the descendants

@api private

[Validate]