Class: Remailer::SMTP::Server::Transaction
- Inherits:
-
Object
- Object
- Remailer::SMTP::Server::Transaction
- Defined in:
- lib/remailer/smtp/server/transaction.rb
Constant Summary collapse
- ATTRIBUTES =
Constants ============================================================
[ :sender, :recipients, :data ].freeze
Instance Method Summary collapse
-
#initialize(options = nil) ⇒ Transaction
constructor
Instance Methods =====================================================.
Constructor Details
#initialize(options = nil) ⇒ Transaction
Instance Methods =====================================================
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/remailer/smtp/server/transaction.rb', line 14 def initialize( = nil) case () when Remailer::SMTP::Server::Transaction ATTRIBUTES.each do |attribute| instance_variable_set("@#{attribute}", .send(attribute)) end when Hash ATTRIBUTES.each do |attr| instance_variable_set("@#{attribute}", [attribute]) end end self.recipients = [ self.recipients ].compact.flatten self.data ||= '' end |