module HelloSign::Configuration
Defines config attributes and default values for HelloSign
module
@author [hellosign]
Constants
- DEFAULT_API_VERSION
- DEFAULT_ENDPOINT
- DEFAULT_OAUTH_ENDPOINT
- DEFAULT_USER_AGENT
- VALID_OPTIONS_KEYS
Public Class Methods
extended(base)
click to toggle source
Sets all configuration options to their default values when this module is extended.
@param base [Object] New module or class extends this module
# File lib/hello_sign/configuration.rb, line 42 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/hello_sign/configuration.rb, line 47 def configure yield self end
options()
click to toggle source
Creates a hash of options
# File lib/hello_sign/configuration.rb, line 52 def options VALID_OPTIONS_KEYS.inject({}) do |option, key| option.merge!(key => send(key)) end end
reset()
click to toggle source
Resets all configuration options to the defaults.
# File lib/hello_sign/configuration.rb, line 59 def reset self.email_address = nil self.client_id = nil self.client_secret = nil self.auth_token = nil self.password = nil self.api_key = nil self.end_point = DEFAULT_ENDPOINT self.oauth_end_point = DEFAULT_OAUTH_ENDPOINT self.api_version = DEFAULT_API_VERSION self.user_agent = DEFAULT_USER_AGENT self.log_level = 3 self.logging = true self.proxy_uri = nil self.proxy_user = nil self.proxy_pass = nil self.timeout = nil end