class Chef::Resource::WindowsUac
Public Instance Methods
bool_to_reg(bool)
click to toggle source
converts a Ruby
true/false to a 1 or 0
@return [Integer] 1:true, 0: false
# File lib/chef/resource/windows_uac.rb, line 74 def bool_to_reg(bool) bool ? 1 : 0 end
consent_behavior_admins_symbol_to_reg(sym)
click to toggle source
converts the symbols we use in the consent_behavior_admins property into numbers 0-5 based on their array index
@return [Integer]
# File lib/chef/resource/windows_uac.rb, line 81 def consent_behavior_admins_symbol_to_reg(sym) [:no_prompt, :secure_prompt_for_creds, :secure_prompt_for_consent, :prompt_for_creds, :prompt_for_consent, :prompt_for_consent_non_windows_binaries].index(sym) end
consent_behavior_users_symbol_to_reg(sym)
click to toggle source
converts the symbols we use in the consent_behavior_users property into numbers 0-2 based on their array index
@return [Integer]
# File lib/chef/resource/windows_uac.rb, line 88 def consent_behavior_users_symbol_to_reg(sym) [:auto_deny, :secure_prompt_for_creds, :prompt_for_creds].index(sym) end