Sha256: f4dce6de640275dec232cec1820f3f0b74c9ca3e5a64168f72b616b77b0a7e25
Contents?: true
Size: 1.15 KB
Versions: 4
Compression:
Stored size: 1.15 KB
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 mutate_body_receiver end # Mutate method send in body scope of `send` # # @return [undefined] # # @api private def mutate_body_receiver return unless n_send?(body) body_meta = AST::Meta::Send.new(body) emit(s(:send, send, body_meta.selector, *body_meta.arguments)) end end # Block end # Node end # Mutator end # Mutant
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mutant-0.8.8 | lib/mutant/mutator/node/block.rb |
mutant-0.8.7 | lib/mutant/mutator/node/block.rb |
mutant-0.8.6 | lib/mutant/mutator/node/block.rb |
mutant-0.8.5 | lib/mutant/mutator/node/block.rb |