Reformatted naive bayes to more idiomatic ruby

Just reformatted code to more readable code.