mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 03:10:39 -07:00
Address comments
This commit is contained in:
@@ -16,11 +16,10 @@ module Liquid
|
||||
def initialize
|
||||
@nodelist = []
|
||||
@blank = true
|
||||
@frozen = false
|
||||
end
|
||||
|
||||
def parse(tokenizer, parse_context, &block)
|
||||
raise FrozenError, "can't modify frozen Liquid::BlockBody" if @frozen
|
||||
raise FrozenError, "can't modify frozen Liquid::BlockBody" if frozen?
|
||||
|
||||
parse_context.line_number = tokenizer.line_number
|
||||
|
||||
@@ -31,8 +30,9 @@ module Liquid
|
||||
end
|
||||
end
|
||||
|
||||
def freeze(_context)
|
||||
@frozen = true
|
||||
def freeze
|
||||
@nodelist.freeze
|
||||
super
|
||||
end
|
||||
|
||||
private def parse_for_liquid_tag(tokenizer, parse_context)
|
||||
@@ -199,7 +199,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def render_to_output_buffer(context, output)
|
||||
raise "Can only render when frozen" unless @frozen
|
||||
raise "Can only render when frozen" unless frozen?
|
||||
|
||||
context.resource_limits.increment_render_score(@nodelist.length)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user