Class: Mutant::Zombifier::Subject

Inherits:
Subject
  • Object
show all
Includes:
NodeHelpers
Defined in:
lib/mutant/zombifier.rb

Overview

Zombifier subject, compatible with mutants loader

Constant Summary

Constants included from NodeHelpers

NodeHelpers::INFINITY, NodeHelpers::NAN, NodeHelpers::NEGATIVE_INFINITY, NodeHelpers::NEW_OBJECT, NodeHelpers::N_EMPTY, NodeHelpers::N_FALSE, NodeHelpers::N_NIL, NodeHelpers::N_TRUE, NodeHelpers::RAISE

Class Method Summary collapse

Instance Method Summary collapse

Methods included from NodeHelpers

#n_not, s

Methods inherited from Subject

#identification, #match_expression, #match_prefixes, #mutations, #original_root, #root, #source, #source_line, #source_path

Class Method Details

.new(file) ⇒ Subject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return new object

Parameters:

Returns:



63
64
65
# File 'lib/mutant/zombifier.rb', line 63

def self.new(file)
  super(file, file.node)
end

Instance Method Details

#zombifyself

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Perform zombification on subject

Returns:

  • (self)


73
74
75
76
77
# File 'lib/mutant/zombifier.rb', line 73

def zombify
  $stderr.puts("Zombifying #{context.source_path}")
  Loader::Eval.call(zombified_root, self)
  self
end