Class: Idid::Delivery
- Inherits:
-
Object
- Object
- Idid::Delivery
- Defined in:
- lib/idid/delivery.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#email(message) ⇒ Object
Public: Send email to iDoneThis for logging.
-
#initialize(config) ⇒ Delivery
constructor
Public: Initialize a new Delivery.
Constructor Details
#initialize(config) ⇒ Delivery
Public: Initialize a new Delivery. It will automatically set the correct delivery options
config - The Hash options to use when sending the email to iDoneThis
Returns a new instance of Delivery
12 13 14 15 |
# File 'lib/idid/delivery.rb', line 12 def initialize(config) @config = config setup_delivery end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
4 5 6 |
# File 'lib/idid/delivery.rb', line 4 def config @config end |
Instance Method Details
#email(message) ⇒ Object
Public: Send email to iDoneThis for logging
message - The String with the actual activity you want to log
Returns Mail::Message object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/idid/delivery.rb', line 22 def email() config = @config # Needed because @config is not in the block scope below Mail.deliver do from config.email to config.idonethis_email subject "I did this" body end end |