Method: Capnotify::Plugin::Message#init

Defined in:
lib/capnotify/plugin/message.rb

#initObject

initialize the plugin



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/capnotify/plugin/message.rb', line 13

def init
  # add a component tagged with this plugin's name
  capnotify.components << Capnotify::Component.new(PLUGIN_NAME) do |c|
    # the header
    c.header = 'Message'

    # the content
    # if notification_msg isn't set, content will be set to nil
    # nil content will prevent the section from being rendered.
    c.content = fetch(:notification_msg, nil)
  end
end