Class: Chef::GuardInterpreter

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/guard_interpreter.rb,
lib/chef/guard_interpreter/default_guard_interpreter.rb,
lib/chef/guard_interpreter/resource_guard_interpreter.rb

Defined Under Namespace

Classes: DefaultGuardInterpreter, ResourceGuardInterpreter

Class Method Summary collapse

Class Method Details

.for_resource(resource, command, command_opts) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/chef/guard_interpreter.rb', line 24

def self.for_resource(resource, command, command_opts)
  if resource.guard_interpreter == :default
    Chef::GuardInterpreter::DefaultGuardInterpreter.new(command, command_opts)
  else
    Chef::GuardInterpreter::ResourceGuardInterpreter.new(resource, command, command_opts)
  end
end