class Liquid::Rails::YieldTag
Constants
- Syntax
Public Class Methods
new(tag_name, markup, context)
click to toggle source
Calls superclass method
# File lib/liquid-rails/tags/content_for_tag.rb, line 57 def initialize(tag_name, markup, context) super if markup =~ Syntax @identifier = $1.gsub('\'', '') else raise SyntaxError.new("Syntax Error - Valid syntax: {% yield [name] %}") end end
Public Instance Methods
render(context)
click to toggle source
# File lib/liquid-rails/tags/content_for_tag.rb, line 67 def render(context) @context = context @context.registers[:view].content_for(@identifier).try(:html_safe) end