Class: Clerk::Config

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

Constant Summary collapse

PRODUCTION_BASE_URL =
"https://api.clerk.dev/v1/".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



21
22
23
24
# File 'lib/clerk.rb', line 21

def initialize
  @base_url = ENV.fetch("CLERK_API_BASE", PRODUCTION_BASE_URL)
  @api_key = ENV["CLERK_API_KEY"]
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



19
20
21
# File 'lib/clerk.rb', line 19

def api_key
  @api_key
end

#base_urlObject

Returns the value of attribute base_url.



19
20
21
# File 'lib/clerk.rb', line 19

def base_url
  @base_url
end

#loggerObject

Returns the value of attribute logger.



19
20
21
# File 'lib/clerk.rb', line 19

def logger
  @logger
end

#middleware_cache_storeObject

Returns the value of attribute middleware_cache_store.



19
20
21
# File 'lib/clerk.rb', line 19

def middleware_cache_store
  @middleware_cache_store
end