class MarkdownUI::CustomTag

Public Class Methods

new(_tag, _content, _klass = nil) click to toggle source
# File lib/markdown-ui/tag/custom_tag.rb, line 4
def initialize(_tag, _content, _klass = nil)
  @tag     = _tag
  @klass   = _klass
  @content = _content
end

Public Instance Methods

render() click to toggle source
# File lib/markdown-ui/tag/custom_tag.rb, line 10
def render
  output = []
  output << "<#{tag}"
  output << "#{klass}>"
  output << content
  output << "</#{tag}>"

  output.join(' ')
end

Protected Instance Methods

tag() click to toggle source
# File lib/markdown-ui/tag/custom_tag.rb, line 22
def tag
  @tag.downcase.strip
end