Class: PermitConfig

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, api_url = DEFAULT_API_URL, pdp_url = DEFAULT_PDP_URL, context = nil, debug = false, logger = nil) ⇒ PermitConfig

Returns a new instance of PermitConfig.



14
15
16
17
18
19
20
21
# File 'lib/config.rb', line 14

def initialize( token, api_url = DEFAULT_API_URL, pdp_url = DEFAULT_PDP_URL,context = nil, debug = false, logger = nil)
  @api_url = api_url
  @pdp_url = pdp_url
  @context = context
  @token = token
  @debug = debug
  @logger = logger
end

Instance Attribute Details

#api_urlObject

This class is used to configure the Permit SDK. It is used to set the base url of the PDP and the api key.

Example:

“‘ruby permit = Permit::Permit.new permit.config.base_url = ’pdp.permit.io’ permit.config “‘



12
13
14
# File 'lib/config.rb', line 12

def api_url
  @api_url
end

#contextObject

This class is used to configure the Permit SDK. It is used to set the base url of the PDP and the api key.

Example:

“‘ruby permit = Permit::Permit.new permit.config.base_url = ’pdp.permit.io’ permit.config “‘



12
13
14
# File 'lib/config.rb', line 12

def context
  @context
end

#debugObject

This class is used to configure the Permit SDK. It is used to set the base url of the PDP and the api key.

Example:

“‘ruby permit = Permit::Permit.new permit.config.base_url = ’pdp.permit.io’ permit.config “‘



12
13
14
# File 'lib/config.rb', line 12

def debug
  @debug
end

#loggerObject

This class is used to configure the Permit SDK. It is used to set the base url of the PDP and the api key.

Example:

“‘ruby permit = Permit::Permit.new permit.config.base_url = ’pdp.permit.io’ permit.config “‘



12
13
14
# File 'lib/config.rb', line 12

def logger
  @logger
end

#pdp_urlObject

This class is used to configure the Permit SDK. It is used to set the base url of the PDP and the api key.

Example:

“‘ruby permit = Permit::Permit.new permit.config.base_url = ’pdp.permit.io’ permit.config “‘



12
13
14
# File 'lib/config.rb', line 12

def pdp_url
  @pdp_url
end

#tokenObject

This class is used to configure the Permit SDK. It is used to set the base url of the PDP and the api key.

Example:

“‘ruby permit = Permit::Permit.new permit.config.base_url = ’pdp.permit.io’ permit.config “‘



12
13
14
# File 'lib/config.rb', line 12

def token
  @token
end