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



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

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)


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

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