Class: AppMap::RSpec::ParseNode

Inherits:
ParseNodeStruct show all
Extended by:
Forwardable
Defined in:
lib/appmap/rspec/parse_node.rb

Overview

ParseNode wraps a generic AST parse node.

Direct Known Subclasses

BlockParseNode

Instance Attribute Summary

Attributes inherited from ParseNodeStruct

#ancestors, #file_path, #node

Class Method Summary collapse

Class Method Details

.from_node(node, file_path, ancestors) ⇒ Object

Build a ParseNode from an AST node.



17
18
19
20
21
22
# File 'lib/appmap/rspec/parse_node.rb', line 17

def from_node(node, file_path, ancestors)
  case node.type
  when :block
    BlockParseNode.new(node, file_path, ancestors.dup)
  end
end