class Chef::Resource::WindowsScript

Public Instance Methods

architecture(arg = nil) click to toggle source
# File lib/chef/resource/windows_script.rb, line 33
def architecture(arg = nil)
  assert_architecture_compatible!(arg) unless 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 44
def assert_architecture_compatible!(desired_architecture)
  unless node_supports_windows_architecture?(node, desired_architecture)
    raise Chef::Exceptions::Win32ArchitectureIncorrect,
      "cannot execute script with requested architecture '#{desired_architecture}' on a system with architecture '#{node_windows_architecture(node)}'"
  end
end