2020-03-20 02:24:35 +07:00

16 lines
493 B
Ruby

module Postman
class Config
def host
@host || ENV['POSTMAN_HOST'] || raise(Error, "Host has not been configured. Set it using the `Postman.configure` block or use `POSTMAN_HOST` environment variable.")
end
attr_writer :host
def server_key
@server_key || ENV['POSTMAN_KEY'] || raise(Error, "Server key has not been configured. Set it using the `Postman.configure` block or use `POSTMAN_KEY` environment variable.")
end
attr_writer :server_key
end
end