class Liquid::Template::TagRegistry

def [](tag_name)

def [](tag_name)
  return nil unless @tags.key?(tag_name)
  return @cache[tag_name] if Liquid.cache_classes
  lookup_class(@tags[tag_name]).tap { |o| @cache[tag_name] = o }
end

def []=(tag_name, klass)

def []=(tag_name, klass)
  @tags[tag_name]  = klass.name
  @cache[tag_name] = klass
end

def delete(tag_name)

def delete(tag_name)
  @tags.delete(tag_name)
  @cache.delete(tag_name)
end

def each(&block)

def each(&block)
  @tags.each(&block)
end

def initialize

def initialize
  @tags  = {}
  @cache = {}
end

def lookup_class(name)

def lookup_class(name)
  Object.const_get(name)
end