Sha256: eb8ff25b54fcc10c440bc8e287ef56a13828a11736910d81c219fa19a8bb0b65

Contents?: true

Size: 519 Bytes

Versions: 4

Compression:

Stored size: 519 Bytes

Contents

require 'uakari'
module Mail
  class Chimpster
    
    attr_accessor :settings, :uakari
    
    def initialize(values)
      self.settings = { :api_key => nil, :to=> nil, :from=>nil}.merge(values)
      self.uakari = Uakari.new(self.settings[:api_key])
    end
    
    def deliver!(mail)
      ::Chimpster.api_key = settings[:api_key]
      ::Chimpster.to = settings[:to]
      ::Chimpster.from = settings[:from]
      ::Chimpster.uakari = uakari
      ::Chimpster.send_through_chimpster(mail)
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
chimpster-0.1.21 lib/chimpster/handlers/mail.rb
chimpster-0.1.20 lib/chimpster/handlers/mail.rb
chimpster-0.1.19 lib/chimpster/handlers/mail.rb
chimpster-0.1.18 lib/chimpster/handlers/mail.rb