# class Chef::ChefFS::DataHandler::ContainerDataHandler

### Public Instance Methods

normalize(container, entry) click to toggle source

    # File lib/chef/chef_fs/data_handler/container_data_handler.rb, line 7
    def normalize(container, entry)
      normalize_hash(container, {
        'containername' => remove_dot_json(entry.name),
        'containerpath' => remove_dot_json(entry.name)
      })
    end

preserve_key(key) click to toggle source

    # File lib/chef/chef_fs/data_handler/container_data_handler.rb, line 14
    def preserve_key(key)
      return key == 'containername'
    end

verify_integrity(object, entry, &on_error) click to toggle source

    # File lib/chef/chef_fs/data_handler/container_data_handler.rb, line 18
    def verify_integrity(object, entry, &on_error)
      base_name = remove_dot_json(entry.name)
      if object['containername'] != base_name
        on_error.call("Name in #{entry.path_for_printing} must be '#{base_name}' (is '#{object['name']}')")
      end
    end