Class: DamageControl::Publisher::Email
- Defined in:
- lib/damagecontrol/publisher/email.rb
Instance Attribute Summary collapse
-
#delivery_method ⇒ Object
Returns the value of attribute delivery_method.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize ⇒ Email
constructor
A new instance of Email.
- #name ⇒ Object
- #publish(build) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ Email
Returns a new instance of Email.
20 21 22 23 24 |
# File 'lib/damagecontrol/publisher/email.rb', line 20 def initialize @delivery_method = "sendmail" @to = "" @from = "\"DamageControl\" <[email protected]>" end |
Instance Attribute Details
#delivery_method ⇒ Object
Returns the value of attribute delivery_method.
12 13 14 |
# File 'lib/damagecontrol/publisher/email.rb', line 12 def delivery_method @delivery_method end |
#enabled ⇒ Object
Returns the value of attribute enabled.
9 10 11 |
# File 'lib/damagecontrol/publisher/email.rb', line 9 def enabled @enabled end |
#from ⇒ Object
Returns the value of attribute from.
18 19 20 |
# File 'lib/damagecontrol/publisher/email.rb', line 18 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
15 16 17 |
# File 'lib/damagecontrol/publisher/email.rb', line 15 def to @to end |
Instance Method Details
#name ⇒ Object
26 27 28 |
# File 'lib/damagecontrol/publisher/email.rb', line 26 def name "Email" end |
#publish(build) ⇒ Object
30 31 32 33 34 |
# File 'lib/damagecontrol/publisher/email.rb', line 30 def publish(build) BuildMailer.template_root = File.(File.dirname(__FILE__) + "/../../../app/views") BuildMailer.delivery_method = @delivery_method BuildMailer.deliver_email(build, self) end |