Class: DigestEmail::DigestProxy

Inherits:
ActiveSupport::BasicObject
Defined in:
lib/digest_email/message_sending.rb

Instance Method Summary collapse

Constructor Details

#initialize(target, options) ⇒ DigestProxy

Returns a new instance of DigestProxy.



3
4
5
6
# File 'lib/digest_email/message_sending.rb', line 3

def initialize(target, options)
  @target = target
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



8
9
10
# File 'lib/digest_email/message_sending.rb', line 8

def method_missing(method, *args)
  DigestEmailGroup.enqueue({:performable => PerformableDigest.new(@target, method.to_sym, args)}.merge(@options))
end