Browse Source

Added inline doc.

Martin Edenhofer 8 years ago
parent
commit
3e2711909a
1 changed files with 23 additions and 0 deletions
  1. 23 0
      lib/notification_factory/template.rb

+ 23 - 0
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 <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'