<commit_before>class Card < ActiveRecord::Base
  has_many :decks_cards
  has_many :decks, through: :decks_cards

  validates :card_id, presence: true
end
<commit_msg>create instance methods of Card<commit_after>class Card < ActiveRecord::Base
  has_many :decks_cards
  has_many :decks, through: :decks_cards

  validates :card_id, presence: true

  def name
    card_data.name
  end

  def set
    MTG::Set.find(set_initials).name
  end

  def power
    card_data.power
  end

  def toughness
    card_data.toughness
  end

  def image_url
    card_data.image_url
  end

  def types
    card_data.types
  end

  # private

  def card_data
    MTG::Card.find(card_id)
  end

  def set_initials
    card_data.set
  end
end

{'fraction_non_alphanumeric': 0.0638002773925104, 'fraction_numerical': 0.0, 'mean_word_length': 3.3233532934131738, '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': '5786925', 'n_tokens_mistral': 270, 'n_tokens_neox': 258, 'n_words': 65}