Sha256: accff0774851fe28f34e19e11188ca65d71fa53c35407d2f949d3797cb684061

Contents?: true

Size: 460 Bytes

Versions: 7

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

module Mutant
  class Subject
    class Method
      # Singleton method subjects
      class Singleton < self

        NAME_INDEX = 1
        SYMBOL     = '.'.freeze

        # Prepare subject for mutation insertion
        #
        # @return [self]
        def prepare
          scope.singleton_class.__send__(:undef_method, name)
          self
        end

      end # Singleton
    end # Method
  end # Subject
end # Mutant

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mutant-0.8.23 lib/mutant/subject/method/singleton.rb
mutant-0.8.22 lib/mutant/subject/method/singleton.rb
mutant-0.8.21 lib/mutant/subject/method/singleton.rb
mutant-0.8.20 lib/mutant/subject/method/singleton.rb
mutant-0.8.19 lib/mutant/subject/method/singleton.rb
mutant-0.8.18 lib/mutant/subject/method/singleton.rb
mutant-0.8.17 lib/mutant/subject/method/singleton.rb