class ChefCompat::CopiedFromChef::Chef::Mixin::ParamsValidate::SetOrReturnProperty
Used by set_or_return to avoid emitting a deprecation warning for “value nil” and to keep default stickiness working exactly the same @api private
Public Instance Methods
call(resource, value = NOT_PASSED)
click to toggle source
Calls superclass method
# File files/lib/chef_compat/copied_from_chef/chef/mixin/params_validate.rb, line 488 def call(resource, value = NOT_PASSED) # setting to nil does a get if value.nil? && !explicitly_accepts_nil?(resource) get(resource, nil_set: true) else super end end
get(resource, nil_set: false)
click to toggle source
Calls superclass method
# File files/lib/chef_compat/copied_from_chef/chef/mixin/params_validate.rb, line 479 def get(resource, nil_set: false) value = super # All values are sticky, frozen or not if !is_set?(resource) set_value(resource, value) end value end