Class: DashamailTransactional::Mailer

Inherits:
Object
  • Object
show all
Defined in:
lib/dashamail/mailer.rb

Instance Method Summary collapse

Constructor Details

#initializeMailer

Returns a new instance of Mailer.



5
6
7
# File 'lib/dashamail/mailer.rb', line 5

def initialize
  @composer = Composer.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



18
19
20
# File 'lib/dashamail/mailer.rb', line 18

def method_missing(method, *args)
  @composer.send(method, *args)
end

Instance Method Details

#check(transaction_id) ⇒ Object



14
15
16
# File 'lib/dashamail/mailer.rb', line 14

def check(transaction_id)
  Request.new.check(transaction_id)
end

#sendObject



9
10
11
12
# File 'lib/dashamail/mailer.rb', line 9

def send
  message = @composer.call
  Request.new.send(message)
end