Class: Mutest::Parser Private

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Mutable
Defined in:
lib/mutest/parser.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 AST Parser

Instance Method Summary collapse

Constructor Details

#initializeundefined

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.

Initialize object



9
10
11
# File 'lib/mutest/parser.rb', line 9

def initialize
  @cache = {}
end

Instance Method Details

#open(path) ⇒ 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.

Parse path into AST

Parameters:

  • path (Pathname)

Returns:

  • (AST::Node)


18
19
20
# File 'lib/mutest/parser.rb', line 18

def open(path)
  @cache[path] ||= SourceFile.read(path)
end