Class: Shipyard::Jekyll::Alert
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Shipyard::Jekyll::Alert
- Includes:
- AlertHelper
- Defined in:
- lib/shipyard-framework/jekyll/tags/alert_tag.rb
Instance Method Summary collapse
-
#initialize(tag_name, type, options) ⇒ Alert
constructor
A new instance of Alert.
- #render(context) ⇒ Object
Methods included from AlertHelper
Methods included from IconHelper
Constructor Details
#initialize(tag_name, type, options) ⇒ Alert
Returns a new instance of Alert.
8 9 10 11 |
# File 'lib/shipyard-framework/jekyll/tags/alert_tag.rb', line 8 def initialize(tag_name, type, ) super @type = type.strip.tr(':','').to_sym unless type.blank? end |
Instance Method Details
#render(context) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/shipyard-framework/jekyll/tags/alert_tag.rb', line 13 def render(context) if @type flash_alert @type, super else flash_alert super end end |