Class: Shipyard::Jekyll::Alert
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Shipyard::Jekyll::Alert
- Includes:
- AlertHelper
- Defined in:
- lib/shipyard-framework/jekyll/alert_tag.rb
Instance Method Summary collapse
-
#initialize(tag_name, params, options) ⇒ Alert
constructor
A new instance of Alert.
- #render(context) ⇒ Object
Methods included from AlertHelper
Constructor Details
#initialize(tag_name, params, options) ⇒ Alert
Returns a new instance of Alert.
8 9 10 11 12 13 |
# File 'lib/shipyard-framework/jekyll/alert_tag.rb', line 8 def initialize(tag_name, params, ) super @params = params.split(',') @type = @params[0].tr(':','').to_sym @text = @params[1] end |
Instance Method Details
#render(context) ⇒ Object
15 16 17 |
# File 'lib/shipyard-framework/jekyll/alert_tag.rb', line 15 def render(context) flash_alert @type, @text end |