Sha256: acb01f273cae6d0debd54d393991a32bdbdd9fda2e9a04a86c1322c16c17db03

Contents?: true

Size: 682 Bytes

Versions: 52

Compression:

Stored size: 682 Bytes

Contents

# frozen_string_literal: true

module Mutant
  class Mutator
    class Node
      # Mutator for resbody nodes
      class Resbody < self

        handle(:resbody)

        children :captures, :assignment, :body

      private

        def dispatch
          emit_assignment(nil)
          emit_body_mutations if body
          mutate_captures
        end

        def mutate_captures
          return unless captures
          Util::Array::Element.call(captures.children).each do |matchers|
            next if matchers.any?(&method(:n_nil?))
            emit_captures(s(:array, *matchers))
          end
        end

      end # Resbody
    end # Node
  end # Mutator
end # Mutant

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
mutant-0.11.11 lib/mutant/mutator/node/resbody.rb
mutant-0.11.10 lib/mutant/mutator/node/resbody.rb
mutant-0.11.9 lib/mutant/mutator/node/resbody.rb
mutant-0.11.8 lib/mutant/mutator/node/resbody.rb
mutant-0.11.7 lib/mutant/mutator/node/resbody.rb
mutant-0.11.6 lib/mutant/mutator/node/resbody.rb
mutant-0.11.5 lib/mutant/mutator/node/resbody.rb
mutant-0.11.4 lib/mutant/mutator/node/resbody.rb
mutant-0.11.3 lib/mutant/mutator/node/resbody.rb
mutant-0.11.2 lib/mutant/mutator/node/resbody.rb
mutant-0.11.1 lib/mutant/mutator/node/resbody.rb
mutant-0.11.0 lib/mutant/mutator/node/resbody.rb
mutant-0.10.35 lib/mutant/mutator/node/resbody.rb
mutant-0.10.34 lib/mutant/mutator/node/resbody.rb
mutant-0.10.33 lib/mutant/mutator/node/resbody.rb
mutant-0.10.32 lib/mutant/mutator/node/resbody.rb
mutant-0.10.31 lib/mutant/mutator/node/resbody.rb
mutant-0.10.30 lib/mutant/mutator/node/resbody.rb
mutant-0.10.29 lib/mutant/mutator/node/resbody.rb
mutant-0.10.28 lib/mutant/mutator/node/resbody.rb