Method: Chef::DataBagItem.validate_id!

Defined in:
lib/chef/data_bag_item.rb

.validate_id!(id_str) ⇒ Object



41
42
43
44
45
# File 'lib/chef/data_bag_item.rb', line 41

def self.validate_id!(id_str)
  if id_str.nil? || ( id_str !~ VALID_ID )
    raise Exceptions::InvalidDataBagItemID, "Data Bag items must have an id matching #{VALID_ID.inspect}, you gave: #{id_str.inspect}"
  end
end