Allows for the safe use of objects as source of template attributes
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
lib
test
MIT-LICENSE
README
Rakefile
init.rb
install.rb
uninstall.rb

README

Stenciller
==============

With stenciller, you will build a template variable swapper that can be
applied to multiple strings. It is used in production for customizable
subject-lines and body sections in a mass-emailer.

Example
=======

# This is an illustration of application, not a working example

contact = User.first
stencil = Stenciller::Builder.new
stencil.append_property_set(contact, :exclusions => User::UNSAFE_FOR_STENCIL)
stencil.append_property_set(pretty_dates)  # Some 'nice' dates for inside emails
stencil.append_property_set(special_links) # A set of tracker urls

@subject     = "#{stencil.draw(newsletter.subject)}"
body[:content] = stencil.draw(newsletter.content)


Copyright (c) 2010 Timothy Frison (tim@frison.ca), released under the MIT license