Class: Chef::Resource::ChefMirror

Inherits:
Cheffish::BaseResource show all
Defined in:
lib/chef/resource/chef_mirror.rb

Constant Summary

Constants included from Cheffish::BaseProperties

Cheffish::BaseProperties::ArrayType

Instance Method Summary collapse

Methods included from Cheffish::BaseProperties

#initialize

Instance Method Details

#freeze(arg = nil) ⇒ Object

‘freeze` is an already-existing instance method on Object, so we can’t use it or we’ll throw a deprecation warning. ‘freeze` has been renamed to `freeze_on_upload` and this method is here to log a deprecation warning.



43
44
45
46
47
48
49
50
51
52
# File 'lib/chef/resource/chef_mirror.rb', line 43

def freeze(arg = nil)
  Chef::Log.warn("Property `freeze` on the `chef_mirror` resource has changed to `freeze_on_upload`." \
    "Please use `freeze_on_upload` instead. This will raise an exception in a future version of the cheffish gem.")

  set_or_return(
    :freeze_on_upload,
    arg,
    kind_of: [TrueClass, FalseClass]
  )
end