Sha256: 73cd7d9edf86f4862895fcc4ef8ce989a1d88c12d08457c6f22dfc65feb3a81a

Contents?: true

Size: 837 Bytes

Versions: 17

Compression:

Stored size: 837 Bytes

Contents

module Mutant
  class Mutator
    class Node
      # Emitter for mutations on 19 blocks
      class Block < self

        handle(:block)

        children :send, :arguments, :body

      private

        # Emit mutants
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          emit_singletons
          emit(send)
          emit_send_mutations(&method(:n_send?))
          emit_arguments_mutations

          mutate_body
        end

        # Emit body mutations
        #
        # @return [undefined]
        #
        # @api private
        #
        def mutate_body
          emit_body(nil)
          emit_body(N_RAISE)

          return unless body
          emit(body)
          emit_body_mutations
        end

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mutant-0.8.0 lib/mutant/mutator/node/block.rb
mutant-0.7.9 lib/mutant/mutator/node/block.rb
mutant-0.7.8 lib/mutant/mutator/node/block.rb
mutant-0.7.7 lib/mutant/mutator/node/block.rb
mutant-0.7.6 lib/mutant/mutator/node/block.rb
mutant-0.7.5 lib/mutant/mutator/node/block.rb
mutant-0.7.4 lib/mutant/mutator/node/block.rb
mutant-0.7.3 lib/mutant/mutator/node/block.rb
mutant-0.7.2 lib/mutant/mutator/node/block.rb
mutant-0.7.1 lib/mutant/mutator/node/block.rb
mutant-0.6.7 lib/mutant/mutator/node/block.rb
mutant-0.6.6 lib/mutant/mutator/node/block.rb
mutant-0.6.5 lib/mutant/mutator/node/block.rb
mutant-0.6.4 lib/mutant/mutator/node/block.rb
mutant-0.6.3 lib/mutant/mutator/node/block.rb
mutant-0.6.2 lib/mutant/mutator/node/block.rb
mutant-0.6.0 lib/mutant/mutator/node/block.rb