Module: Card::Set::Type::NotificationTemplate::HtmlFormat

Extended by:
AbstractFormat
Defined in:
tmpsets/set/mod021-standard/type/notification_template.rb

Instance Method Summary collapse

Instance Method Details

#alert_message(context, message_card) ⇒ Object



22
23
24
25
26
27
# File 'tmpsets/set/mod021-standard/type/notification_template.rb', line 22

def alert_message context, message_card
  mformat = subformat message_card
  alert card.alert_class, true, card.disappear? do
    mformat.contextual_content context, view: alert_view(mformat)
  end
end

#alert_view(format) ⇒ Object



29
30
31
# File 'tmpsets/set/mod021-standard/type/notification_template.rb', line 29

def alert_view format
  format.respond_to?(:notify) ? format.notify : :core
end