Class: MarkdownUI::CustomSegment
- Inherits:
-
Object
- Object
- MarkdownUI::CustomSegment
- Defined in:
- lib/markdown-ui/segment/custom_segment.rb
Instance Method Summary collapse
-
#initialize(element, content) ⇒ CustomSegment
constructor
A new instance of CustomSegment.
- #render ⇒ Object
Constructor Details
#initialize(element, content) ⇒ CustomSegment
Returns a new instance of CustomSegment.
5 6 7 8 |
# File 'lib/markdown-ui/segment/custom_segment.rb', line 5 def initialize(element, content) @element = element @content = content end |
Instance Method Details
#render ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/markdown-ui/segment/custom_segment.rb', line 10 def render element = @element.strip content = @content.strip klass = "ui #{element} segment" MarkdownUI::StandardTag.new(content, klass).render end |