Sha256: 1f90133688fc2c5b44d7d6f99d7e3d4dd2575c8b2627ef84f67e30877a8de05b
Contents?: true
Size: 549 Bytes
Versions: 33
Compression:
Stored size: 549 Bytes
Contents
# encoding: utf-8 module Mutant # An AST cache class Cache # This is explicitly empty! Ask me if you are interested in reasons :D include Equalizer.new # Initialize object # # @return [undefined] # # @api private # def initialize @cache = {} end # Return node for file # # @return [AST::Node] # # @api private # def parse(path) @cache.fetch(path) do @cache[path] = Parser::CurrentRuby.parse(File.read(path)) end end end # Cache end # Mutant
Version data entries
33 entries across 33 versions & 1 rubygems