Class: Mutant::Context Private

Inherits:
Object
  • Object
show all
Includes:
Unparser::Adamantium
Defined in:
lib/mutant/context.rb

Overview

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

An abstract context where mutations can be applied to.

Defined Under Namespace

Classes: ConstantScope

Instance Method Summary collapse

Instance Method Details

#identificationString

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.

Identification string

Returns:

  • (String)


48
# File 'lib/mutant/context.rb', line 48

def identification = scope.raw.name

#match_expressionsObject

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.



36
# File 'lib/mutant/context.rb', line 36

def match_expressions = scope.match_expressions

#root(node) ⇒ Parser::AST::Node

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 root node for mutation

Returns:

  • (Parser::AST::Node)


41
42
43
# File 'lib/mutant/context.rb', line 41

def root(node)
  constant_scope.call(node)
end