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)


50
51
52
# File 'lib/mutant/context.rb', line 50

def identification
  scope.raw.name
end

#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
37
38
# File 'lib/mutant/context.rb', line 36

def match_expressions
  scope.match_expressions
end

#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)


43
44
45
# File 'lib/mutant/context.rb', line 43

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