Update project_euler_1.rb

Change to class-level methods