Method: Chef::Resource.chef_version_for_provides
- Defined in:
- lib/chef/resource.rb
.chef_version_for_provides(constraint = NOT_PASSED) ⇒ Object
This API can be used for backcompat to do:
chef_version_for_provides “< 14.0” if defined?(:chef_version_for_provides)
For core chef versions that do not support chef_version: in provides lines.
Since resource_name calls provides the generally correct way of doing this is to do chef_version_for_provides first, then resource_name and then any additional options provides lines.
Once we no longer care about supporting chef < 14.4 then we can deprecate this API.
1364 1365 1366 1367 |
# File 'lib/chef/resource.rb', line 1364 def self.chef_version_for_provides(constraint = NOT_PASSED) @chef_version_for_provides = constraint unless constraint == NOT_PASSED @chef_version_for_provides ||= nil end |