Class: Gollum::Macro::Flash
- Inherits:
-
Gollum::Macro
- Object
- Gollum::Macro
- Gollum::Macro::Flash
- Defined in:
- lib/gollum-lib/macro/flash.rb
Instance Method Summary collapse
Methods inherited from Gollum::Macro
Constructor Details
This class inherits a constructor from Gollum::Macro
Instance Method Details
#render(message, icon = '', type = '') ⇒ Object
4 5 6 7 8 |
# File 'lib/gollum-lib/macro/flash.rb', line 4 def render(, icon='', type='') flash_type = ['warn', 'error', 'success'].include?(type) ? "flash-#{type}" : '' flash_icon = icon.empty? ? '' : %Q(data-gollum-icon="#{icon}") %Q(<div class="flash #{flash_type} my-2" #{flash_icon}>#{}</div>) end |