Class: Plum::LiquidTags::FormTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Plum::LiquidTags::FormTag
- Defined in:
- lib/plum/liquid_tags/form_tag.rb
Instance Method Summary collapse
-
#initialize(tag_name, markup, options) ⇒ FormTag
constructor
A new instance of FormTag.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, markup, options) ⇒ FormTag
Returns a new instance of FormTag.
4 5 6 7 |
# File 'lib/plum/liquid_tags/form_tag.rb', line 4 def initialize(tag_name, markup, ) super @handle_expression = Liquid::Expression.parse(markup.strip) end |
Instance Method Details
#render(context) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/plum/liquid_tags/form_tag.rb', line 9 def render(context) handle = context.evaluate(@handle_expression).to_s renderer = context.registers[:form_renderer] renderer ? renderer.call(handle) : "" end |