<commit_before>class PlayCard
  attr_reader :errors

  def initialize(player, round, card)
    @player = player
    @round  = round
    @card   = card
    @errors = []
  end

  def call
    @round.game.with_lock do
      legal_move? && play_card && increment_round
    end

    @errors.none?
  end

  private

  # TODO push out to player_options class and use a validate method
  def legal_move?
    top_card = @round.pile.top
    return true if @card.playable_on?(top_card)

    @errors.push "cannot play card, #{@card.to_s} on #{top_card}"
    false
  end

  def play_card
    @player.play!(@card)
  end
<commit_msg>Refactor string interpolation call to_s as implicit<commit_after>class PlayCard
  attr_reader :errors

  def initialize(player, round, card)
    @player = player
    @round  = round
    @card   = card
    @errors = []
  end

  def call
    @round.game.with_lock do
      legal_move? && play_card && increment_round
    end

    @errors.none?
  end

  private

  # TODO push out to player_options class and use a validate method
  def legal_move?
    top_card = @round.pile.top
    return true if @card.playable_on?(top_card)

    @errors.push "cannot play card, #{@card} on #{top_card}"
    false
  end

  def play_card
    @player.play!(@card)
  end

{'fraction_non_alphanumeric': 0.09219858156028368, 'fraction_numerical': 0.0, 'mean_word_length': 2.825301204819277, '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': '4300080', 'n_tokens_mistral': 437, 'n_tokens_neox': 419, 'n_words': 126}