<commit_before>class Deck < ActiveRecord::Base
  has_many :decks_cards
  has_many :cards, through: :decks_cards
end<commit_msg>create deck instance method for selecting cards by type<commit_after>class Deck < ActiveRecord::Base
  has_many :decks_cards
  has_many :cards, through: :decks_cards

  def cards_by_type(type)
    cards.select do |card|
      card.types.include?(type)
    end
  end

end
{'fraction_non_alphanumeric': 0.08060453400503778, 'fraction_numerical': 0.0, 'mean_word_length': 4.852941176470588, 'pattern_counts': {'":': 0, '<': 5, '<?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': '305052', 'n_tokens_mistral': 133, 'n_tokens_neox': 132, 'n_words': 35}