Class: MarkdownUI::Button::Group::Buttons::Custom

Inherits:
Object
  • Object
show all
Defined in:
lib/markdown-ui/button/group/buttons/custom.rb

Instance Method Summary collapse

Constructor Details

#initialize(element, content) ⇒ Custom

Returns a new instance of Custom.



7
8
9
10
# File 'lib/markdown-ui/button/group/buttons/custom.rb', line 7

def initialize(element, content)
  @element = element
  @content = content
end

Instance Method Details

#renderObject



12
13
14
15
16
17
# File 'lib/markdown-ui/button/group/buttons/custom.rb', line 12

def render
  klass = "ui #{@element} buttons"
  content = @content.strip

  MarkdownUI::StandardTag.new(content, klass).render
end