module ExperianMS::Configuration
Constants
- API_VERSION
- BASE_URL
- CLIENT_ID
- CONTENT_TYPE
- CUSTOMER_ID
- FORM_GROUP_ID
- KEY
- OAUTH2_ENDPOINT
- SECRET
- VALID_OPTIONS_KEYS
Public Class Methods
extended(base)
click to toggle source
When this module is extended, set all configuration options to their default values
# File lib/experian_ms/configuration.rb, line 24 def self.extended(base) base.reset end
Public Instance Methods
configure() { |self| ... }
click to toggle source
Convenience method to allow configuration options to be set in a block
# File lib/experian_ms/configuration.rb, line 29 def configure yield self end
options()
click to toggle source
Create a hash of options and their values
# File lib/experian_ms/configuration.rb, line 34 def options VALID_OPTIONS_KEYS.inject({}) do |option, key| option.merge!(key => send(key)) end end
reset()
click to toggle source
Reset all configuration options to defaults
# File lib/experian_ms/configuration.rb, line 41 def reset self.base_url = BASE_URL self.customer_id = CUSTOMER_ID self.api_version = API_VERSION self.form_group_id = FORM_GROUP_ID self.key = KEY self.secret = SECRET self.client_id = CLIENT_ID self.oauth2_endpoint = OAUTH2_ENDPOINT self.content_type = CONTENT_TYPE end