Instrument forloop.name

This commit is contained in:
Peter Zhu
2020-11-12 13:54:21 -05:00
parent 2f75db604f
commit ea4f1885f8
2 changed files with 22 additions and 1 deletions

View File

@@ -9,7 +9,12 @@ module Liquid
@index = 0
end
attr_reader :name, :length, :parentloop
attr_reader :length, :parentloop
def name
Usage.increment('forloop_drop_name')
@name
end
def index
@index + 1