Sha256: f2a298ba8776493cdafb65e7be3d4ccf3b3c29fb29a276afe5b83b92acd1028c
Contents?: true
Size: 530 Bytes
Versions: 21
Compression:
Stored size: 530 Bytes
Contents
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
21 entries across 21 versions & 1 rubygems