Add ParseContext#new_block_body to centralize the liquid-c override point

This commit is contained in:
Dylan Thacker-Smith
2020-09-09 12:25:35 -04:00
parent dfbbf87ba9
commit bbc56f35ec
3 changed files with 6 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ module Liquid
# @api public
def new_body
BlockBody.new
parse_context.new_block_body
end
# @api public

View File

@@ -48,7 +48,7 @@ module Liquid
private
def new_body
Liquid::BlockBody.new
parse_context.new_block_body
end
end
end

View File

@@ -19,6 +19,10 @@ module Liquid
@options[option_key]
end
def new_block_body
Liquid::BlockBody.new
end
def partial=(value)
@partial = value
@options = value ? partial_options : @template_options