lib/ripe/blocks/serial_block.rb
##
# (see MultiBlock#prune)
#
# A {SerialBlock} differs from a {MultiBlock} or {ParallelBlock} in that
# there is a linear dependency for its children blocks as they are to be
# run in serial.  If a given block must be run, then all subsequent
# blocks that depend on it must be run as well.
A {SerialBlock} differs from a {MultiBlock} or {ParallelBlock} in that
there is a linear dependency for its children blocks as they are to be
run in serial.  If a given block must be run, then all subsequent
blocks that depend on it must be run as well.
A { SerialBlock } differs from a { MultiBlock } or { ParallelBlock } in that there is a linear dependency for its children blocks as they are to be run in serial . If a given block must be run then all subsequent blocks that depend on it must be run as well .
def prune(protect, depend)
        return super_prune(protect, depend) if !depend
        return self if protect
        @blocks = @blocks.map do |block|
          new_protect = !block.targets_exist?
          new_block = block.prune(protect, depend)
          protect = new_protect
          new_block
        end
        @blocks = @blocks.compact
        case @blocks.length
        when 0
          nil
        when 1
          @blocks.first
        else
          self
        end
      end
def prune ( protect , depend ) return super_prune ( protect , depend ) if ! depend return self if protect @blocks = @blocks . map do | block | new_protect = ! block . targets_exist? new_block = block . prune ( protect , depend ) protect = new_protect new_block end @blocks = @blocks . compact case @blocks . length when 0 nil when 1 @blocks . first else self end end
(see MultiBlock#prune)
A {SerialBlock} differs from a {MultiBlock} or {ParallelBlock} in that
there is a linear dependency for its children blocks as they are to be
run in serial.
( see MultiBlock#prune ) A { SerialBlock } differs from a { MultiBlock } or { ParallelBlock } in that there is a linear dependency for its children blocks as they are to be run in serial .
protect
depend