module ServiceNow::Configuration
Constants
- DEFAULT_USER_AGENT
- 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/servicenow/configuration.rb, line 18 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/servicenow/configuration.rb, line 13 def configure yield self end
options()
click to toggle source
Create a hash of options and their values
# File lib/servicenow/configuration.rb, line 23 def options VALID_OPTIONS_KEYS.inject({}) do |option, key| option.merge!(key => send(key)) end end
reset()
click to toggle source
# File lib/servicenow/configuration.rb, line 29 def reset self.debug = DEFAULT_DEBUG self.user_agent = DEFAULT_USER_AGENT end