Parent

Methods

MindoroMarine::Acts::HausdorffSpace::HSArray

We need an array to hold children. Because we want to be able to write parent.children << SomeModel.new then we need to do special stuff in “<<” but we don’t want to mixin into Array because that might (almost certainly would) mess up other code, so we’ll get very javary and subclass Array

Attributes

parent[RW]

(Not documented)

Public Instance Methods

<<(elem) click to toggle source

(Not documented)

# File lib/acts_as_hausdorff_space.rb, line 65
        def <<(elem)
        if elem.is_a?(Array) # if it is an array then load each item into the HSArray in turn
         elem.each do |item| 
         #puts "each item #{elem.class.name} item #{item.class.name}"
         self << item
         end
        else
         super  
         #puts "add one #{elem.class.name}"
         elem.parent = self.parent if self.parent && elem.respond_to?('parent') 
        end         
       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.