Class: MailToHipChat::MessageChutes::TestEmail
- Inherits:
-
Object
- Object
- MailToHipChat::MessageChutes::TestEmail
- Includes:
- MailToHipChat::MessageChute
- Defined in:
- lib/mail_to_hip_chat/message_chutes/test_email.rb
Overview
Takes a test email and sends it to the configured HipChat rooms, to verify a deployment based on this library is working.
Instance Method Summary collapse
- #call(params) ⇒ Object
-
#initialize(opts) ⇒ TestEmail
constructor
A new instance of TestEmail.
Methods included from MailToHipChat::MessageChute
Constructor Details
#initialize(opts) ⇒ TestEmail
Returns a new instance of TestEmail.
11 12 13 |
# File 'lib/mail_to_hip_chat/message_chutes/test_email.rb', line 11 def initialize(opts) initialize_hipchat_opts(opts) end |
Instance Method Details
#call(params) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/mail_to_hip_chat/message_chutes/test_email.rb', line 15 def call(params) return false unless params["subject"] =~ /testing setup/i = Mustache.render("Message:<br />{{message}}", :message => params["plain"]) ("Testing", ) true end |