Sha256: a1d686b6da5299da28ce614c8a58783b9c446fd328e553ff55a606674ca25a70
Contents?: true
Size: 808 Bytes
Versions: 1
Compression:
Stored size: 808 Bytes
Contents
class BaseNotifier < Outbox::Notifier layout :set_layout def welcome(hash = {}) render_message(hash) end def implicit_multipart(hash = {}) if hash.delete(:attachments) attachments['invoice.pdf'] = 'This is test File content' end render_message(hash) end def composed_message_with_implicit_render email do subject 'Composed Message' end end def custom_headers headers 'X-Custom-1' => 'foo' headers['X-Custom-2'] = 'bar' end def explicit_sms_message(skip_email = false) skip_email! if skip_email sms do from '1234' body 'Explicit Message' end end def implicit_variants(layout = false) @layout = layout end def only_sms_template skip_email! end protected def set_layout @layout end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
outbox-rails-1.0.0 | spec/internal/app/notifiers/base_notifier.rb |