Simple Caesar cipher cryptanalysis in Ruby
Nice work.  You can get some easy improvements by:


Taking advantage of ruby's functional methods to eliminate temp variables and generally make the code more declarative
Use constants where appropriate
Make your code reflect your style by using static method on a module rather than a class -- you're not actually using the class for anything in the original code.  Alternatively, you can pass in a save the ciphertext in the class constructor, and then do something like crypt_instance.analyze.
Avoid "magic numbers" like 25 or 26.


Rewrite:

module Cryptanalysis
  ALPHABET = ('A'..'Z').to_a

  ENGLISH_FREQUENCY = { :A =&gt; 0.080, :B =&gt; 0.015, :C =&gt; 0.030,
                        :D =&gt; 0.040, :E =&gt; 0.130, :F =&gt; 0.020,
                        :G =&gt; 0.015, :H =&gt; 0.060, :I =&gt; 0.065,
                        :J =&gt; 0.005, :K =&gt; 0.005, :L =&gt; 0.035,
                        :M =&gt; 0.030, :N =&gt; 0.070, :O =&gt; 0.080,
                        :P =&gt; 0.020, :Q =&gt; 0.002, :R =&gt; 0.065,
                        :S =&gt; 0.060, :T =&gt; 0.090, :U =&gt; 0.030,
                        :V =&gt; 0.010, :W =&gt; 0.015, :X =&gt; 0.005,
                        :Y =&gt; 0.020, :Z =&gt; 0.002 }

  def self.decrypt_caesar(ciphertext, shift)
    decrypt = ALPHABET
    encrypt = ALPHABET.rotate(shift)
    ciphertext.tr(encrypt, decrypt)
  end

  def self.analyze(ciphertext)
    freqs = frequencies(clean(ciphertext))

    (0..ALPHABET.size)
    .map{|i| [i, score(freqs, i)]}
    .sort_by { |x| -x[1] }
    .take(5)
    .to_h
  end

  def self.clean(text)
    text.upcase.gsub(/[^A-Z]/i, '')
  end

  def self.score(freqs, shift)
    ENGLISH_FREQUENCY
    .values
    .rotate(shift)
    .zip(freqs.values)
    .map{|x| x.first * x.last}
    .reduce(:+)
  end

  def self.frequencies(text)
    ENGLISH_FREQUENCY
    .keys
    .map {|k| [k.to_sym, text.count(k.to_s) / text.size.to_f]}
    .to_h
  end
end

text = "the quick brown fox jumps over the lazy dog"
puts 'Top 5 possible shifts: ' 
puts Cryptanalysis.analyze(text)