Module: Chef::DSL::RegistryHelper
- Included in:
- RebootPending, Universal
- Defined in:
- lib/chef/dsl/registry_helper.rb
Instance Method Summary collapse
- #registry_data_exists?(key_path, value, architecture = :machine) ⇒ Boolean
- #registry_get_subkeys(key_path, architecture = :machine) ⇒ Object
- #registry_get_values(key_path, architecture = :machine) ⇒ Object
- #registry_has_subkeys?(key_path, architecture = :machine) ⇒ Boolean
-
#registry_key_exists?(key_path, architecture = :machine) ⇒ Boolean
the registry instance is cheap to build and throwing it away ensures we don’t carry any state (e.g. magic 32-bit/64-bit settings) between calls.
- #registry_value_exists?(key_path, value, architecture = :machine) ⇒ Boolean
Instance Method Details
#registry_data_exists?(key_path, value, architecture = :machine) ⇒ Boolean
57 58 59 60 |
# File 'lib/chef/dsl/registry_helper.rb', line 57 def registry_data_exists?(key_path, value, architecture = :machine) registry = Chef::Win32::Registry.new(run_context, architecture) registry.data_exists?(key_path, value) end |
#registry_get_subkeys(key_path, architecture = :machine) ⇒ Object
47 48 49 50 |
# File 'lib/chef/dsl/registry_helper.rb', line 47 def registry_get_subkeys(key_path, architecture = :machine) registry = Chef::Win32::Registry.new(run_context, architecture) registry.get_subkeys(key_path) end |
#registry_get_values(key_path, architecture = :machine) ⇒ Object
37 38 39 40 |
# File 'lib/chef/dsl/registry_helper.rb', line 37 def registry_get_values(key_path, architecture = :machine) registry = Chef::Win32::Registry.new(run_context, architecture) registry.get_values(key_path) end |
#registry_has_subkeys?(key_path, architecture = :machine) ⇒ Boolean
42 43 44 45 |
# File 'lib/chef/dsl/registry_helper.rb', line 42 def registry_has_subkeys?(key_path, architecture = :machine) registry = Chef::Win32::Registry.new(run_context, architecture) registry.has_subkeys?(key_path) end |
#registry_key_exists?(key_path, architecture = :machine) ⇒ Boolean
the registry instance is cheap to build and throwing it away ensures we don’t carry any state (e.g. magic 32-bit/64-bit settings) between calls
32 33 34 35 |
# File 'lib/chef/dsl/registry_helper.rb', line 32 def registry_key_exists?(key_path, architecture = :machine) registry = Chef::Win32::Registry.new(run_context, architecture) registry.key_exists?(key_path) end |
#registry_value_exists?(key_path, value, architecture = :machine) ⇒ Boolean
52 53 54 55 |
# File 'lib/chef/dsl/registry_helper.rb', line 52 def registry_value_exists?(key_path, value, architecture = :machine) registry = Chef::Win32::Registry.new(run_context, architecture) registry.value_exists?(key_path, value) end |