Module: Lettr

Defined in:
lib/lettr.rb,
lib/lettr/base.rb,
lib/lettr/mail_extensions.rb

Defined Under Namespace

Modules: ActionMailer, Deliverable, MailExtensions, ObjectConverter, Resource, Whitelist Classes: ApiMailing, Base, Collection, Delivery, Mailer, Railtie

Class Method Summary collapse

Class Method Details

.credentials=(credentials) ⇒ Object



32
33
34
35
# File 'lib/lettr.rb', line 32

def self.credentials=(credentials)
  Lettr::Base.user = credentials[:user]
  Lettr::Base.pass = credentials[:pass]
end

.method_missing(*args, &block) ⇒ Object



45
46
47
48
49
50
51
52
# File 'lib/lettr.rb', line 45

def self.method_missing *args, &block
  if args.first.to_s =~ /^to_/
    super
  end
  Lettr::Base.load_api_mailing_or_fail_loud *args
rescue RestClient::ResourceNotFound
  super
end