Class: MarkdownUI::CustomTag
- Inherits:
-
Shared::TagKlass
- Object
- Shared::TagKlass
- MarkdownUI::CustomTag
- Defined in:
- lib/markdown-ui/tag/custom_tag.rb
Instance Method Summary collapse
-
#initialize(_tag, _content, _klass = nil) ⇒ CustomTag
constructor
A new instance of CustomTag.
- #render ⇒ Object
Constructor Details
#initialize(_tag, _content, _klass = nil) ⇒ CustomTag
Returns a new instance of CustomTag.
4 5 6 7 8 |
# File 'lib/markdown-ui/tag/custom_tag.rb', line 4 def initialize(_tag, _content, _klass = nil) @tag = _tag @klass = _klass @content = _content end |
Instance Method Details
#render ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/markdown-ui/tag/custom_tag.rb', line 10 def render output = [] output << "<#{tag}" output << "#{klass}>" output << content output << "</#{tag}>" output.join(' ') end |