Module: Mutant::AST::Meta

Defined in:
lib/mutant/ast/meta.rb

Overview

Node meta information mixin

Defined Under Namespace

Classes: Generic, Send

Constant Summary collapse

REGISTRY =
{}

Class Method Summary collapse

Class Method Details

.for(node) ⇒ Meta

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 meta for node

Parameters:

  • node (Parser::AST::Node)

Returns:



16
17
18
# File 'lib/mutant/ast/meta.rb', line 16

def self.for(node)
  REGISTRY.fetch(node.type, Generic).new(node)
end