module OAS::Configuration
Constants
- DEFAULT_ACCOUNT
The account that will be used to connect if none is set
- DEFAULT_ENDPOINT
The endpoint that will be used to connect if none is set
- DEFAULT_PASSWORD
By default, don’t set a password
- DEFAULT_TIMEOUT
By default, set open and read timeout to 300
- DEFAULT_USERNAME
By default, don’t set a username
- VALID_OPTIONS_KEYS
An array of valid keys in the options hash when configuring a {OAS::Client}
Public Class Methods
extended(base)
click to toggle source
# File lib/oas/configuration.rb, line 29 def self.extended(base) base.reset! end
Public Instance Methods
configure() { |self| ... }
click to toggle source
# File lib/oas/configuration.rb, line 33 def configure yield self if block_given? end
options()
click to toggle source
# File lib/oas/configuration.rb, line 37 def options options = {} VALID_OPTIONS_KEYS.each{|k| options[k] = send(k) } options end
reset!()
click to toggle source
# File lib/oas/configuration.rb, line 43 def reset! self.endpoint = DEFAULT_ENDPOINT self.account = DEFAULT_ACCOUNT self.username = DEFAULT_USERNAME self.password = DEFAULT_PASSWORD self.timeout = DEFAULT_TIMEOUT self.logger = nil end