<commit_before>class BeerAdvocate::Beer
  attr_accessor :name, :rank, :brewery, :style, :abv, :rating, :url, :description

  @@all=[]

  def initialize(name)
    @name = name
    save
    self
  end

  def save
    @@all << self
  end

  def self.all
    beer = BeerAdvocate::Beer.new("Doubleganger")
    beer.style = "American Double / Imperial IPA"
    beer.rating = 4.61
    beer.rank = 1

    beer = BeerAdvocate::Beer.new("Curiousity Twenty Seven")
    beer.style = "American Double / Imperial IPA"
    beer.rating = 4.53
    beer.rank = 2
  end<commit_msg>add missing return @@all in Beer#all / add data only if not already there<commit_after>class BeerAdvocate::Beer
  attr_accessor :name, :rank, :brewery, :style, :abv, :rating, :url, :description

  @@all=[]

  def initialize(name)
    @name = name
    save
    self
  end

  def save
    @@all << self
  end

  def self.all
    if @@all.count == 0
      beer = BeerAdvocate::Beer.new("Doubleganger")
      beer.style = "American Double / Imperial IPA"
      beer.rating = 4.61
      beer.rank = 1

      beer = BeerAdvocate::Beer.new("Curiousity Twenty Seven")
      beer.style = "American Double / Imperial IPA"
      beer.rating = 4.53
      beer.rank = 2
    end

    @@all
  end
{'fraction_non_alphanumeric': 0.12148028962188254, 'fraction_numerical': 0.013676588897827836, 'mean_word_length': 2.669616519174041, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2851567', 'n_tokens_mistral': 455, 'n_tokens_neox': 428, 'n_words': 118}