class AssetManagerDeleteAssetWorker < WorkerBase
  def perform(legacy_url_path)
    gds_api_response = asset_manager.whitehall_asset(legacy_url_path)
    asset_url = gds_api_response['id']
    asset_id = asset_url[/\/assets\/(.*)/, 1]

    asset_manager.delete_asset(asset_id)
  end

private

  def asset_manager
    Services.asset_manager
  end
end

class AssetManagerDeleteAssetWorker < WorkerBase
  def perform(legacy_url_path)
    attributes = asset_manager.whitehall_asset(legacy_url_path).to_hash
    asset_url = attributes['id']
    asset_id = asset_url[/\/assets\/(.*)/, 1]

    asset_manager.delete_asset(asset_id)
  end

private

  def asset_manager
    Services.asset_manager
  end
end

Bring AssetManagerDeleteAssetWorker into line with the update worker
Bring AssetManagerDeleteAssetWorker into line with the update worker

By calling GdsApi::Response#to_hash on the response from the Asset
Manager API and renaming the local variable from gds_api_response ->
attributes.

I think it's important to keep these two worker classes in line with
each other because there is some duplication between them. Keeping them
in line with each other will make it easier to remove the duplication
later.
