Module: Replyr::HandleBounce::ClassMethods
- Defined in:
- lib/replyr/handle_bounce.rb
Instance Method Summary collapse
-
#handle_bounce(*options, &block) ⇒ Object
Usage: class Comment < ActiveRecord::Base handle_bounce do |comment, email| # your custom code (e.g. mark email as invalid) end end.
Instance Method Details
#handle_bounce(*options, &block) ⇒ Object
Usage: class Comment < ActiveRecord::Base
handle_bounce do |comment, email|
# your custom code (e.g. mark email as invalid)
end
end
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/replyr/handle_bounce.rb', line 17 def handle_bounce(*, &block) = . define_method :handle_bounce do |email| block.call(self, email) end define_method :bounce_address_object do BounceAddress.new(self) end define_method :bounce_address do bounce_address_object.to_s end end |