Class: Mailbin::DeliveryMethod
- Inherits:
-
Object
- Object
- Mailbin::DeliveryMethod
- Defined in:
- lib/mailbin/delivery_method.rb
Instance Attribute Summary collapse
-
#settings ⇒ Object
Returns the value of attribute settings.
Instance Method Summary collapse
- #deliver!(mail) ⇒ Object
-
#initialize(options = {}) ⇒ DeliveryMethod
constructor
A new instance of DeliveryMethod.
Constructor Details
#initialize(options = {}) ⇒ DeliveryMethod
Returns a new instance of DeliveryMethod.
5 6 7 |
# File 'lib/mailbin/delivery_method.rb', line 5 def initialize( = {}) self.settings = end |
Instance Attribute Details
#settings ⇒ Object
Returns the value of attribute settings.
3 4 5 |
# File 'lib/mailbin/delivery_method.rb', line 3 def settings @settings end |
Instance Method Details
#deliver!(mail) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/mailbin/delivery_method.rb', line 9 def deliver!(mail) mail. = SecureRandom.uuid FileUtils.mkdir_p(settings[:location]) File.open(location_for(mail), "w") do |file| file.write(mail.encoded) end end |