Class: MarkdownUI::SpanTag
- Inherits:
-
Object
- Object
- MarkdownUI::SpanTag
- Defined in:
- lib/markdown-ui/tag/span_tag.rb
Instance Method Summary collapse
-
#initialize(content, klass = nil) ⇒ SpanTag
constructor
A new instance of SpanTag.
- #render ⇒ Object
Constructor Details
#initialize(content, klass = nil) ⇒ SpanTag
Returns a new instance of SpanTag.
3 4 5 6 |
# File 'lib/markdown-ui/tag/span_tag.rb', line 3 def initialize(content, klass = nil) @klass = klass @content = content end |
Instance Method Details
#render ⇒ Object
8 9 10 11 12 |
# File 'lib/markdown-ui/tag/span_tag.rb', line 8 def render klass = "#{@klass}".downcase.split(' ').uniq "<span class=\"#{klass.join(' ').strip}\">#{@content}</span>" end |