Make tag registry enumerable

This commit is contained in:
Gaurav Chande
2016-04-25 11:38:42 -04:00
parent 23d2beed41
commit 6adc431a19
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -19,6 +19,8 @@ module Liquid
@@file_system = BlankFileSystem.new
class TagRegistry
include Enumerable
def initialize
@tags = {}
@cache = {}
@@ -41,6 +43,10 @@ module Liquid
@cache.delete(tag_name)
end
def each(&block)
@tags.each(&block)
end
private
def lookup_class(name)