class DmCore::LiquidBlock
Constants
- NamedSyntax
- SimpleSyntax
Public Class Methods
details()
click to toggle source
# File lib/dm_core/liquid_extensions.rb, line 120 def details { name: self.tag_name, summary: '', description: '', example: '', category: '' } end
new(tag_name, markup, tokens)
click to toggle source
Calls superclass method
# File lib/dm_core/liquid_extensions.rb, line 100 def initialize(tag_name, markup, tokens) @attributes = {} markup.scan(Liquid::TagAttributes) do |key, value| @attributes[key] = ((value.delete "\"").delete "\'") end super end
tag_name()
click to toggle source
# File lib/dm_core/liquid_extensions.rb, line 117 def tag_name self.name.split('::').last.underscore end
Public Instance Methods
allow_empty_block()
click to toggle source
Liquid
will automatically throw away a block with empty/blank content. Call this in the tag's render method to allow the tag to be rendered anyway
# File lib/dm_core/liquid_extensions.rb, line 111 def allow_empty_block @blank = false end