<commit_before>class AssetPresenter
  def initialize(asset, view_context)
    @asset = asset
    @view_context = view_context
  end

  def as_json(options = {})
    {
      _response_info: {
        status: options[:status] || "ok",
      },
      id: @view_context.asset_url(@asset.id),
      name: @asset.file.file.identifier,
      content_type: @asset.content_type,
      file_url: "#{Plek.new.asset_root}/media/#{@asset.id}/#{@asset.file.file.identifier}",
      state: @asset.state,
    }
  end
end<commit_msg>Simplify AssetPresenter#as_json by using Asset#filename<commit_after>class AssetPresenter
  def initialize(asset, view_context)
    @asset = asset
    @view_context = view_context
  end

  def as_json(options = {})
    {
      _response_info: {
        status: options[:status] || "ok",
      },
      id: @view_context.asset_url(@asset.id),
      name: @asset.filename,
      content_type: @asset.content_type,
      file_url: "#{Plek.new.asset_root}/media/#{@asset.id}/#{@asset.filename}",
      state: @asset.state,
    }
  end
end
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.0, 'mean_word_length': 3.1215686274509804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2955261', 'n_tokens_mistral': 361, 'n_tokens_neox': 356, 'n_words': 59}