Sha256: 8b7b8c028a5cd47b6d26100316e5510b68c30b0e41872b0ea79ff62c50e8a9cb

Contents?: true

Size: 663 Bytes

Versions: 2

Compression:

Stored size: 663 Bytes

Contents

# Provides an Interface for implementing an Adapter. Adapters are supposed to handle communication with the email service (ie: Sendgrid) and to be included by MailCannon::Envelope. MailCannon::Envelope attributes should be accessed to figure out what to send to the email service.
module MailCannon::Adapter
  module InstanceMethods
    # Sends an Envelope with 1 recipient.
    def send!
      raise 'Not available for this adapter!'
    end
    
    # Sends an Envelope with multiple recipients.
    def send_bulk!
      raise 'Not available for this adapter!'
    end
  end
  
  def self.included(receiver)
    receiver.send :include, InstanceMethods
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mailcannon-0.0.5 lib/mailcannon/adapter.rb
mailcannon-0.0.4 lib/mailcannon/adapter.rb