You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: armstrong_number.rb
    path of file: ./repos/Ruby_on_Rails
    
    the code of the file until where you have to start completion: def is_armstrong_number(n)
  num_digits = n.to_s.length
  sum_of_powers = 0
  temp = n
  while temp > 0

    
def is_armstrong_number(n)
  num_digits = n.to_s.length
  sum_of_powers = 0
  temp = n
  while temp > 0
    digit = temp % 10
    sum_of_powers += digit**num_digits
    temp /= 10
  end