Method: Chef::Resource#guard_interpreter
- Defined in:
- lib/chef/resource.rb
#guard_interpreter(arg = nil) ⇒ Class, ...
The guard interpreter that will be used to process only_if and not_if statements. If left unset, the #default_guard_interpreter will be used.
Must be a resource class like Chef::Resource::Execute, or a corresponding to the name of a resource. The resource must descend from Chef::Resource::Execute.
TODO this needs to be coerced on input so that retrieval is consistent.
489 490 491 492 493 494 495 |
# File 'lib/chef/resource.rb', line 489 def guard_interpreter(arg = nil) if arg.nil? @guard_interpreter || @default_guard_interpreter else set_or_return(:guard_interpreter, arg, kind_of: Symbol) end end |