Class: Gollum::Macro::Warn

Inherits:
Gollum::Macro show all
Defined in:
lib/gollum-lib/macro/warn.rb

Instance Method Summary collapse

Methods inherited from Gollum::Macro

#initialize, instance

Constructor Details

This class inherits a constructor from Gollum::Macro

Instance Method Details

#render(warning) ⇒ Object



4
5
6
7
8
# File 'lib/gollum-lib/macro/warn.rb', line 4

def render(warning)
  icon = Octicons::Octicon.new('alert', {width: 24, height: 24})
  icon.options[:class] << ' mr-2'
  "<div class='flash flash-warn'>#{icon.to_svg}#{warning}</div>"
end