Method: Chef::DataBagItem#object_name
- Defined in:
- lib/chef/data_bag_item.rb
#object_name ⇒ Object
102 103 104 105 106 107 108 |
# File 'lib/chef/data_bag_item.rb', line 102 def object_name raise Exceptions::ValidationFailed, "You must have an 'id' or :id key in the raw data" unless raw_data.key?("id") raise Exceptions::ValidationFailed, "You must have declared what bag this item belongs to!" unless data_bag id = raw_data["id"] "data_bag_item_#{data_bag}_#{id}" end |