Sha256: faef2d409cf0df9e1d04ce4562c2be8abf74e529ffced70484f04a97679c207c

Contents?: true

Size: 315 Bytes

Versions: 2

Compression:

Stored size: 315 Bytes

Contents

module RbPlusPlus
  class NodeCache #:nodoc:
    # Retrieves or initializes a node's information cache
    def self.get(node)
      demangled = node.attributes['id']
      @@nodes ||= {}
      @@nodes[demangled] ||= {}
    end
    
    # Clears out the cache
    def self.clear
      @@nodes = {}
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rbplusplus-0.9.1 lib/rbplusplus/transformers/node_cache.rb
rbplusplus-0.9 lib/rbplusplus/transformers/node_cache.rb