GitHub PullRequestReviewCommentEvent at 2014-01-17 16:58:24
Repository: wdi_2_ruby_lab_arguments
Actor: grantovich
Payload: {"comment":{"url":"https://api.github.com/repos/ga-wdi-boston/wdi_2_ruby_lab_arguments/pulls/comments/8972142","id":8972142,"diff_hunk":"@@ -0,0 +1,88 @@\n+\n+class Polygon\n+\n+\tattr_accessor :sides, :num_sides\n+\n+\tdef initialize(*sides)\n+\t\t@sides = *sides\n+\t\t@num_sides = sides.count\n+\tend\n+\n+\tdef sum_interior_angles\n+\t\t180 + (180 * (@num_sides - 3))\n+\tend\n+\n+\tdef number_corners\n+\t\t@num_sides\n+\tend\n+\n+\tdef degrees_of_freedom\n+\t\t2 * @num_sides\n+\tend\n+\n+\tdef name_of_polygon\n+\n+\t\tcase @num_sides\n+\t\twhen 3\n+\t\t\t\"trigon\"\n+\t\twhen 4\n+\t\t\t\"tetragon\"\n+\t\twhen 5\n+\t\t\t\"pentagon\"\n+\t\twhen 6\n+\t\t\t\"hexagon\"\n+\t\twhen 7\n+\t\t\t\"heptagon\"\n+\t\twhen 8\n+\t\t\t\"octagon\"\n+\t\twhen 9\n+\t\t\t\"enneagon\"\n+\t\twhen 10\n+\t\t\t\"decagon\"\n+\t\twhen 11\n+\t\t\t\"hendecagon\"\n+\t\twhen 12\n+\t\t\t\"dodecagon\"\n+\t\twhen 13\n+\t\t\t\"tridecagon\"\n+\t\twhen 14\n+\t\t\t\"tetradecagon\"\n+\t\twhen 15\n+\t\t\t\"pendecagon\"\n+\t\twhen 16\n+\t\t\t\"hexdecagon\"\n+\t\twhen 17\n+\t\t\t\"heptadecagon\"\n+\t\twhen 18\n+\t\t\t\"octadecagon\"\n+\t\twhen 19\n+\t\t\t\"enneadecagon\"\n+\t\twhen 20\n+\t\t\t\"icosagon\"\n+\t\telse\n+\t\t\t\"#{@num_sides}-gon\"","path":"polygon.rb","position":63,"original_position":63,"commit_id":"8cd1973880def88b9e4b9f9ae80958ccfd2db513","original_commit_id":"8cd1973880def88b9e4b9f9ae80958ccfd2db513","user":{"login":"grantovich","id":394835,"avatar_url":"https://gravatar.com/avatar/b6c92201404bd9b616fbba5e783cb3d8?d=https%3A%2F%2Fidenticons.github.com%2F50bf48b85ed71ba0f25be359e2495785.png&r=x","gravatar_id":"b6c92201404bd9b616fbba5e783cb3d8","url":"https://api.github.com/users/grantovich","html_url":"https://github.com/grantovich","followers_url":"https://api.github.com/users/grantovich/followers","following_url":"https://api.github.com/users/grantovich/following{/other_user}","gists_url":"https://api.github.com/users/grantovich/gists{/gist_id}","starred_url":"https://api.github.com/users/grantovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grantovich/subscriptions","organizations_url":"https://api.github.com/users/grantovich/orgs","repos_url":"https://api.github.com/users/grantovich/repos","events_url":"https://api.github.com/users/grantovich/events{/privacy}","received_events_url":"https://api.github.com/users/grantovich/received_events","type":"User","site_admin":false},"body":"Nice solution, still returns something useful for all cases =)","created_at":"2014-01-17T16:58:24Z","updated_at":"2014-01-17T16:58:24Z","html_url":"https://github.com/ga-wdi-boston/wdi_2_ruby_lab_arguments/pull/12#discussion_r8972142","pull_request_url":"https://api.github.com/repos/ga-wdi-boston/wdi_2_ruby_lab_arguments/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-boston/wdi_2_ruby_lab_arguments/pulls/comments/8972142"},"html":{"href":"https://github.com/ga-wdi-boston/wdi_2_ruby_lab_arguments/pull/12#discussion_r8972142"},"pull_request":{"href":"https://api.github.com/repos/ga-wdi-boston/wdi_2_ruby_lab_arguments/pulls/12"}}}}