# File lib/bee.rb, line 403
    def extend(parent)
      # set appropriate targets
      for targets in parent.hash.values
        for target in targets
          target.targets = self
        end
      end
      # insert parent targets before current ones
      for name in parent.hash.keys
        if @hash[name]
          @hash[name] = parent.hash[name] + @hash[name]
        else
          @hash[name] = parent.hash[name]
        end
      end
      # remove dependencies of the parent
      for targets in parent.hash.values
        for target in targets
          target.depends.clear
        end
      end
      # set default default target to parent one if none was set
      @default = @default || parent.default
    end