Sha256: 30d2949577044041889d53342e9f98d5f0a31656394c99312be15376296240ce

Contents?: true

Size: 880 Bytes

Versions: 11

Compression:

Stored size: 880 Bytes

Contents

module Mutant
  class Mutator
    class Node

      # Mutator for begin nodes
      class Begin < self

        handle(:begin)

      private

        # Emit mutants
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          Util::Array.each(children, self) do |children|
            if children.length > 1
              emit_self(*children)
            end
          end
          children.each do |child|
            emit(child)
          end
        end

        # Test if parent input is a send
        #
        # @return [true]
        #   if parent input is a send node
        #
        # @return [false]
        #   otherwise
        #
        # @api private
        #
        def parent_send?
          parent && parent.input.type == :send
        end

      end # Block
    end # Node
  end # Mutator
end # Mutant

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mutant-0.3.0.beta20 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta19 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta18 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta17 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta16 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta15 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta14 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta13 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta12 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta11 lib/mutant/mutator/node/begin.rb
mutant-0.3.0.beta10 lib/mutant/mutator/node/begin.rb