Class: AppMail::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/app_mail/config.rb

Instance Attribute Summary collapse

Instance Attribute Details

#hostObject



4
5
6
# File 'lib/app_mail/config.rb', line 4

def host
  @host || ENV['APPMAIL_HOST'] || 'api.appmail.io'
end

#server_keyObject



9
10
11
# File 'lib/app_mail/config.rb', line 9

def server_key
  @server_key || ENV['APPMAIL_KEY'] || raise(Error, "Server key has not been configured. Set it using the `AppMail.configure` block or use `APPMAIL_KEY` environment variable.")
end