Added inline doc.
This commit is contained in:
parent
67381c07bd
commit
3e2711909a
1 changed files with 23 additions and 0 deletions
|
@ -1,5 +1,28 @@
|
|||
class NotificationFactory::Template
|
||||
|
||||
=begin
|
||||
|
||||
examples how to use
|
||||
|
||||
message_subject = NotificationFactory::Template.new(
|
||||
{
|
||||
ticket: Ticket.first,
|
||||
},
|
||||
'de-de',
|
||||
'some template <b><%= d "ticket.title", false %></b> <%= c "fqdn", false %>',
|
||||
false
|
||||
).render
|
||||
|
||||
message_body = NotificationFactory::Template.new(
|
||||
{
|
||||
ticket: Ticket.first,
|
||||
},
|
||||
'de-de',
|
||||
'some template <b><%= d "ticket.title", true %></b> <%= c "fqdn", true %>',
|
||||
).render
|
||||
|
||||
=end
|
||||
|
||||
def initialize(objects, locale, template, escape = true)
|
||||
@objects = objects
|
||||
@locale = locale || 'en-us'
|
||||
|
|
Loading…
Reference in a new issue