Class: Mutant::Subject::Method::Instance::Memoized
- Inherits:
-
Mutant::Subject::Method::Instance
- Object
- Mutant::Subject
- Mutant::Subject::Method
- Mutant::Subject::Method::Instance
- Mutant::Subject::Method::Instance::Memoized
- Includes:
- AST::Sexp
- Defined in:
- lib/mutant/subject/method/instance.rb
Overview
Mutator for memoized instance methods
Constant Summary
Constants inherited from Mutant::Subject::Method::Instance
LINE_INCREMENT, NAME_INDEX, SYMBOL, WARN_METHODS_UNDEFINED
Instance Method Summary collapse
-
#prepare ⇒ self
private
Prepare subject for mutation insertion.
-
#source ⇒ String
private
Return source.
Methods inherited from Mutant::Subject::Method::Instance
Methods inherited from Mutant::Subject::Method
Methods inherited from Mutant::Subject
#expression, #identification, #match_expressions, #mutations, #root, #source_line, #source_path, #tests
Instance Method Details
#prepare ⇒ self
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.
Prepare subject for mutation insertion
71 72 73 74 75 |
# File 'lib/mutant/subject/method/instance.rb', line 71 def prepare scope.send(:memoized_methods).instance_variable_get(:@memory).delete(name) super self end |
#source ⇒ String
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 source
60 61 62 |
# File 'lib/mutant/subject/method/instance.rb', line 60 def source Unparser.unparse(memoizer_node(node)) end |