<commit_before># encoding: utf-8

class ApplicationDecorator < Draper::Base
  delegate :to_s, to: :model

  def resized_image(size, options = {})
    h.image_tag resized_url(size), options
  end

  def resized_url(size)
    resize(size).url
  end

  def actions_list
    lista_de_acciones acciones
  end

  def created_at
    format_date model.created_at
  end

  def updated_at
    format_date model.updated_at
  end

  def textilize(texto)
    # Mantenemos este ayudante en vez de pasarlo aquí, porque
    # lo usamos en la página de ayuda del editor.
    h.strict_textilize(texto)
  end

private
  def lista_de_acciones(acciones)
    h.actions_list acciones, model
  end

  def resize(size)
    model.imagen.thumb("#{size}x#{size}#")
  end

  def format_date(date)
    h.content_tag :time, h.l(date, format: :long), datetime: datetime_attr(date)
  end

  def datetime_attr(date)
    if date.acts_like?(:time)
      date.xmlschema
    else
      date.rfc3339
    end
  end
end<commit_msg>Nombres de métodos más adecuados.<commit_after># encoding: utf-8

class ApplicationDecorator < Draper::Base
  delegate :to_s, to: :model

  def resized_image(size, options = {})
    h.image_tag resized_url(size), options
  end

  def resized_url(size)
    resize(size).url
  end

  def actions_list
    lista_de_acciones acciones
  end

  def created_at
    time_tag model.created_at
  end

  def updated_at
    time_tag model.updated_at
  end

  def textilize(texto)
    # Mantenemos este ayudante en vez de pasarlo aquí, porque
    # lo usamos en la página de ayuda del editor.
    h.strict_textilize(texto)
  end

private
  def lista_de_acciones(acciones)
    h.actions_list acciones, model
  end

  def resize(size)
    model.imagen.thumb("#{size}x#{size}#")
  end

  def time_tag(date)
    h.content_tag :time, format_date(date), datetime: datetime_attr(date)
  end

  def format_date(date)
    h.l(date, format: :long)
  end

  def datetime_attr(date)
    if date.acts_like?(:time)
      date.xmlschema
    else
      date.rfc3339
    end
  end
end
{'fraction_non_alphanumeric': 0.08268101761252446, 'fraction_numerical': 0.004892367906066536, 'mean_word_length': 3.2872117400419287, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3091272', 'n_tokens_mistral': 769, 'n_tokens_neox': 745, 'n_words': 185}