Class: Mutant::AST Private

Inherits:
Object
  • Object
show all
Includes:
Unparser::Adamantium
Defined in:
lib/mutant/ast.rb,
lib/mutant/ast/meta.rb,
lib/mutant/ast/sexp.rb,
lib/mutant/ast/nodes.rb,
lib/mutant/ast/types.rb,
lib/mutant/ast/pattern.rb,
lib/mutant/ast/meta/send.rb,
lib/mutant/ast/structure.rb,
lib/mutant/ast/meta/const.rb,
lib/mutant/ast/meta/optarg.rb,
lib/mutant/ast/meta/symbol.rb,
lib/mutant/ast/meta/resbody.rb,
lib/mutant/ast/pattern/lexer.rb,
lib/mutant/ast/pattern/token.rb,
lib/mutant/ast/named_children.rb,
lib/mutant/ast/pattern/parser.rb,
lib/mutant/ast/pattern/source.rb,
lib/mutant/ast/node_predicates.rb,
lib/mutant/ast/find_metaclass_containing.rb

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.

Defined Under Namespace

Modules: Meta, NamedChildren, NodePredicates, Nodes, Sexp, Structure, Types Classes: FindMetaclassContaining, Pattern, View

Instance Method Summary collapse

Instance Method Details

#on_line(line) ⇒ Object

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.



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

def on_line(line)
  line_map.fetch(line, EMPTY_HASH).map do |node, stack|
    View.new(node:, stack:)
  end
end