lib/jamf/api/connection.rb
# From whatever was given in params[:pw], figure out the password to use
#
# @param params[Hash] The params for #connect
#
# @return [String] The password for the connection
#
From whatever was given in params[:pw], figure out the password to use
From whatever was given in params [ : pw ] figure out the password to use
def acquire_password(param_pw)
      pw =
        if param_pw == :prompt
          Jamf.prompt_for_password "Enter the password for Jamf user #{@user}@#{@host}:"
        elsif param_pw.is_a?(Symbol) && param_pw.to_s.start_with?('stdin')
          param_pw.to_s =~ /^stdin(\d+)$/
          line = Regexp.last_match(1)
          line ||= 1
          Jamf.stdin line
        else
          param_pw
        end 
      pw
    end
def acquire_password ( param_pw ) pw = if param_pw == :prompt Jamf . prompt_for_password "Enter the password for Jamf user #{@user}@#{@host}:" elsif param_pw . is_a? ( Symbol ) && param_pw . to_s . start_with? ( 'stdin' ) param_pw . to_s =~ / ^stdin( \d +)$ / line = Regexp . last_match ( 1 ) line ||= 1 Jamf . stdin line else param_pw end pw end
From whatever was given in params[:pw], figure out the password to use
From whatever was given in params [ : pw ] figure out the password to use
# if
The password for the connection
The password for the connection
String
param_pw
params
The params for #connect
The params for #connect