Created
November 19, 2021 18:45
-
-
Save cdrani/fb24dab2454c1ee32da628491566cc65 to your computer and use it in GitHub Desktop.
Braze Configuration Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Braze | |
class << self | |
attr_accessor :configuration | |
end | |
def self.configure | |
self.configuration ||= Configuration.new | |
yield(configuration) | |
end | |
class Configuration | |
attr_accessor :rest_api_url, :api_key | |
def initialize | |
@rest_api_key = ENV['BRAZE_REST_API_URL'] | |
@api_key = ENV['BRAZE_API_KEY'] | |
end | |
end | |
end | |
# config/initializers/braze.rb | |
Braze.configure do |config| | |
config.url = EN | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment