lib/jamf/api/connection.rb
def apply_module_defaults(params)
      # if we have no port set by this point, assume on-prem.
      params[:port] ||= ON_PREM_SSL_PORT
      params[:timeout] ||= DFT_TIMEOUT
      params[:open_timeout] ||= DFT_OPEN_TIMEOUT
      params[:ssl_version] ||= DFT_SSL_VERSION
      params[:token_refresh] ||= DFT_TOKEN_REFRESH
      # if we have a TTY, pw defaults to :prompt
      params[:pw] ||= :prompt if STDIN.tty?
    end
# Apply the module defaults to the params for the #connect method
#
# @param params[Hash] The params for #connect
#
# @return [Hash] The params with defaults applied
#
Apply the module defaults to the params for the #connect method
Apply the module defaults to the params for the #connect method
def apply_module_defaults(params)
      params[:port] ||= ON_PREM_SSL_PORT
      params[:timeout] ||= DFT_TIMEOUT
      params[:open_timeout] ||= DFT_OPEN_TIMEOUT
      params[:ssl_version] ||= DFT_SSL_VERSION
      params[:token_refresh] ||= DFT_TOKEN_REFRESH
      params[:pw] ||= :prompt if STDIN.tty?
    end
def apply_module_defaults ( params ) params [ :port ] ||= ON_PREM_SSL_PORT params [ :timeout ] ||= DFT_TIMEOUT params [ :open_timeout ] ||= DFT_OPEN_TIMEOUT params [ :ssl_version ] ||= DFT_SSL_VERSION params [ :token_refresh ] ||= DFT_TOKEN_REFRESH params [ :pw ] ||= :prompt if STDIN . tty? end
Apply the module defaults to the params for the #connect method
Apply the module defaults to the params for the #connect method
# if we have no port set by this point, assume on-prem. # if we have a TTY, pw defaults to :prompt
The params with defaults applied
The params with defaults applied
Hash
params
The params for #connect
The params for #connect