Refactor violation method of naming.rb