Class: Postal::Config

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

Instance Attribute Summary collapse

Instance Attribute Details

#hostObject



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

def host
  @host || ENV['POSTAL_HOST'] || raise(Error, "Host has not been configured. Set it using the `Postal.configure` block or use `POSTAL_HOST` environment variable.")
end

#server_keyObject



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

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