Sha256: 3921f84a103c71ade26d1cbbc6f9239e4454cfcdafcb7d2f9d9c6906911bff61

Contents?: true

Size: 831 Bytes

Versions: 6

Compression:

Stored size: 831 Bytes

Contents

module Mutant
  class Mutator
    class Node
      # Namespace for define mutations
      class Define < self

      private

        # Emit mutations
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          emit_arguments_mutations
          if body
            emit_body_mutations
          else
            emit_body(NEW_OBJECT)
          end
        end

        # Mutator for instance method defines
        class Instance < self

          handle :def

          children :name, :arguments, :body

        end # Instance

        # Mutator for singleton method defines
        class Singleton < self

          handle :defs

          children :subject, :name, :arguments, :body

        end # Singelton

      end # Define
    end # Node
  end # Mutator
end # Mutant

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mutant-0.3.0.beta7 lib/mutant/mutator/node/define.rb
mutant-0.3.0.beta6 lib/mutant/mutator/node/define.rb
mutant-0.3.0.beta5 lib/mutant/mutator/node/define.rb
mutant-0.3.0.beta4 lib/mutant/mutator/node/define.rb
mutant-0.3.0.beta3 lib/mutant/mutator/node/define.rb
mutant-0.3.0.beta2 lib/mutant/mutator/node/define.rb