move logic to lib/pascal_triangle.rb, fix naming issue