Class: MarkdownUI::Button::Icon
- Inherits:
-
Object
- Object
- MarkdownUI::Button::Icon
- Defined in:
- lib/markdown-ui/button/icon.rb
Instance Method Summary collapse
-
#initialize(content, klass = nil, _id = nil) ⇒ Icon
constructor
A new instance of Icon.
- #render ⇒ Object
Constructor Details
#initialize(content, klass = nil, _id = nil) ⇒ Icon
Returns a new instance of Icon.
5 6 7 8 9 |
# File 'lib/markdown-ui/button/icon.rb', line 5 def initialize(content, klass = nil, _id = nil) @klass = klass @id = _id @content = content end |
Instance Method Details
#render ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/markdown-ui/button/icon.rb', line 11 def render content = MarkdownUI::Content::Parser.new(@content).parse klass = "ui #{@klass} icon button" _id = @id MarkdownUI::StandardTag.new(content, klass, _id).render end |