class Chef::Resource::WindowsScript
Public Class Methods
new(name, run_context, resource_name, interpreter_command)
click to toggle source
Calls superclass method
Chef::Resource::Script.new
# File lib/chef/resource/windows_script.rb, line 28 def initialize(name, run_context, resource_name, interpreter_command) super(name, run_context) @interpreter = interpreter_command @resource_name = resource_name end
Public Instance Methods
architecture(arg=nil)
click to toggle source
# File lib/chef/resource/windows_script.rb, line 38 def architecture(arg=nil) assert_architecture_compatible!(arg) if ! arg.nil? result = set_or_return( :architecture, arg, :kind_of => Symbol ) end
Protected Instance Methods
assert_architecture_compatible!(desired_architecture)
click to toggle source
# File lib/chef/resource/windows_script.rb, line 49 def assert_architecture_compatible!(desired_architecture) if ! node_supports_windows_architecture?(node, desired_architecture) raise Chef::Exceptions::Win32ArchitectureIncorrect, "cannot execute script with requested architecture '#{desired_architecture.to_s}' on a system with architecture '#{node_windows_architecture(node)}'" end end