diff --git a/lib/notification_factory/template.rb b/lib/notification_factory/template.rb index 13e740186..b10a9ecac 100644 --- a/lib/notification_factory/template.rb +++ b/lib/notification_factory/template.rb @@ -1,5 +1,28 @@ class NotificationFactory::Template +=begin + +examples how to use + + message_subject = NotificationFactory::Template.new( + { + ticket: Ticket.first, + }, + 'de-de', + 'some template <%= d "ticket.title", false %> <%= c "fqdn", false %>', + false + ).render + + message_body = NotificationFactory::Template.new( + { + ticket: Ticket.first, + }, + 'de-de', + 'some template <%= d "ticket.title", true %> <%= c "fqdn", true %>', + ).render + +=end + def initialize(objects, locale, template, escape = true) @objects = objects @locale = locale || 'en-us'