Sha256: 72e17b3f042323386ca83fcec85af19880000d0f3ac4e0022db25355a88b0af2

Contents?: true

Size: 373 Bytes

Versions: 7

Compression:

Stored size: 373 Bytes

Contents

# frozen_string_literal: true

# Render content from variable
#
# == Basic usage:
#    {%render product.description}
#
class RenderTag < LiquidumTag
  def render(context)
    super

    return unless argv1

    template = Liquid::Template.parse(argv1)
    template.render(context, registers: context.registers)
  end
end

Liquid::Template.register_tag('render', RenderTag)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
liquidum-1.2.1 lib/liquidum/liquid/tags/render_tag.rb
liquidum-1.2.0 lib/liquidum/liquid/tags/render_tag.rb
liquidum-1.1.2 lib/liquidum/liquid/tags/render_tag.rb
liquidum-1.1.1 lib/liquidum/liquid/tags/render_tag.rb
liquidum-1.1.0 lib/liquidum/liquid/tags/render_tag.rb
liquidum-1.0.22 lib/liquidum/liquid/tags/render_tag.rb
liquidum-1.0.17 lib/liquidum/liquid/tags/render_tag.rb