Class: Chef::Provider::Batch

Inherits:
WindowsScript show all
Defined in:
lib/chef/provider/batch.rb

Constant Summary

Constants included from Mixin::ShellOut

Mixin::ShellOut::DEPRECATED_OPTIONS

Instance Attribute Summary

Attributes inherited from Chef::Provider

#action, #current_resource, #new_resource, #run_context

Instance Method Summary collapse

Methods inherited from WindowsScript

#action_run, #script_file

Methods included from Mixin::WindowsArchitectureHelper

#assert_valid_windows_architecture!, #disable_wow64_file_redirection, #is_i386_windows_process?, #node_supports_windows_architecture?, #node_windows_architecture, #restore_wow64_file_redirection, #valid_windows_architecture?, #wow64_architecture_override_required?

Methods inherited from Script

#action_run, #interpreter, #script_file, #set_owner_and_group, #unlink_script_file

Methods inherited from Execute

#action_run, #load_current_resource, #whyrun_supported?

Methods included from Mixin::ShellOut

#run_command_compatible_options, #shell_out, #shell_out!

Methods inherited from Chef::Provider

#action_nothing, #cleanup_after_converge, #converge_by, #cookbook_name, #define_resource_requirements, #events, #load_current_resource, #node, #process_resource_requirements, #requirements, #resource_collection, #resource_updated?, #run_action, #set_updated_status, #whyrun_mode?, #whyrun_supported?

Methods included from DSL::Recipe

#method_missing

Methods included from Mixin::ConvertToClassName

#convert_to_class_name, #convert_to_snake_case, #filename_to_qualified_string, #snake_case_basename

Constructor Details

#initialize(new_resource, run_context) ⇒ Batch

Returns a new instance of Batch.



25
26
27
# File 'lib/chef/provider/batch.rb', line 25

def initialize (new_resource, run_context)
  super(new_resource, run_context, '.bat')
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Chef::DSL::Recipe

Instance Method Details

#flagsObject



29
30
31
# File 'lib/chef/provider/batch.rb', line 29

def flags
  @new_resource.flags.nil? ? '/c' : new_resource.flags + ' /c'
end