{"action":"created","comment":{"url":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/comments/63125240","id":63125240,"diff_hunk":"@@ -0,0 +1,39 @@\n+defmodule Protocols do\n+  use Koans\n+\n+  defprotocol School do\n+    def enrol(name)\n+  end\n+\n+  defimpl School, for: SecondarySchool do\n+    def enrol(name) do\n+      \"#{name} enrolled at secondary school\"\n+    end\n+  end\n+\n+  defimpl School, for: DanceSchool do\n+    def enrol(name) do\n+      \"#{name} enrolled for dance\"\n+    end\n+  end\n+\n+  defmodule EveningClass do end\n+\n+  @schools %{\n+    :secondary => School.SecondarySchool,\n+    :dance => School.DanceSchool,\n+    :evening => EveningClass\n+  }\n+\n+  koan \"Commonality is the secret\" do\n+    school = Map.get(@schools, :dance)","path":"lib/koans/15_protocols.ex","position":29,"original_position":29,"commit_id":"d93b7fa0f53c01a4426eb4f6dcbf03f68131536c","original_commit_id":"d93b7fa0f53c01a4426eb4f6dcbf03f68131536c","user":{"login":"iamvery","id":79619,"avatar_url":"https://avatars.githubusercontent.com/u/79619?v=3","gravatar_id":"","url":"https://api.github.com/users/iamvery","html_url":"https://github.com/iamvery","followers_url":"https://api.github.com/users/iamvery/followers","following_url":"https://api.github.com/users/iamvery/following{/other_user}","gists_url":"https://api.github.com/users/iamvery/gists{/gist_id}","starred_url":"https://api.github.com/users/iamvery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamvery/subscriptions","organizations_url":"https://api.github.com/users/iamvery/orgs","repos_url":"https://api.github.com/users/iamvery/repos","events_url":"https://api.github.com/users/iamvery/events{/privacy}","received_events_url":"https://api.github.com/users/iamvery/received_events","type":"User","site_admin":false},"body":"Using a map in this case actually feels like an unnecessary indirection. Any problem with just doing\r\n\r\n```\r\nSchool.DanceSchool.enroll(\"Emily\")\r\n```\r\n","created_at":"2016-05-13T02:13:51Z","updated_at":"2016-05-13T02:13:51Z","html_url":"https://github.com/elixirkoans/elixir-koans/pull/116#discussion_r63125240","pull_request_url":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/116","_links":{"self":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/comments/63125240"},"html":{"href":"https://github.com/elixirkoans/elixir-koans/pull/116#discussion_r63125240"},"pull_request":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/116"}}},"pull_request":{"url":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/116","id":69899551,"html_url":"https://github.com/elixirkoans/elixir-koans/pull/116","diff_url":"https://github.com/elixirkoans/elixir-koans/pull/116.diff","patch_url":"https://github.com/elixirkoans/elixir-koans/pull/116.patch","issue_url":"https://api.github.com/repos/elixirkoans/elixir-koans/issues/116","number":116,"state":"open","locked":false,"title":"Adds koans for protocols","user":{"login":"gemcfadyen","id":1843633,"avatar_url":"https://avatars.githubusercontent.com/u/1843633?v=3","gravatar_id":"","url":"https://api.github.com/users/gemcfadyen","html_url":"https://github.com/gemcfadyen","followers_url":"https://api.github.com/users/gemcfadyen/followers","following_url":"https://api.github.com/users/gemcfadyen/following{/other_user}","gists_url":"https://api.github.com/users/gemcfadyen/gists{/gist_id}","starred_url":"https://api.github.com/users/gemcfadyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemcfadyen/subscriptions","organizations_url":"https://api.github.com/users/gemcfadyen/orgs","repos_url":"https://api.github.com/users/gemcfadyen/repos","events_url":"https://api.github.com/users/gemcfadyen/events{/privacy}","received_events_url":"https://api.github.com/users/gemcfadyen/received_events","type":"User","site_admin":false},"body":"@felipesere @ukutaht @Maikon \r\n\r\nHi all, I've added a koan for protocols. Please take a look and see what you think.","created_at":"2016-05-12T20:15:51Z","updated_at":"2016-05-13T02:13:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9e70ebd0d761d5290c2c4e356fa7c1c18ec7366","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/116/commits","review_comments_url":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/116/comments","review_comment_url":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixirkoans/elixir-koans/issues/116/comments","statuses_url":"https://api.github.com/repos/elixirkoans/elixir-koans/statuses/d93b7fa0f53c01a4426eb4f6dcbf03f68131536c","head":{"label":"elixirkoans:add-protocol-koan","ref":"add-protocol-koan","sha":"d93b7fa0f53c01a4426eb4f6dcbf03f68131536c","user":{"login":"elixirkoans","id":18631461,"avatar_url":"https://avatars.githubusercontent.com/u/18631461?v=3","gravatar_id":"","url":"https://api.github.com/users/elixirkoans","html_url":"https://github.com/elixirkoans","followers_url":"https://api.github.com/users/elixirkoans/followers","following_url":"https://api.github.com/users/elixirkoans/following{/other_user}","gists_url":"https://api.github.com/users/elixirkoans/gists{/gist_id}","starred_url":"https://api.github.com/users/elixirkoans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixirkoans/subscriptions","organizations_url":"https://api.github.com/users/elixirkoans/orgs","repos_url":"https://api.github.com/users/elixirkoans/repos","events_url":"https://api.github.com/users/elixirkoans/events{/privacy}","received_events_url":"https://api.github.com/users/elixirkoans/received_events","type":"Organization","site_admin":false},"repo":{"id":48109902,"name":"elixir-koans","full_name":"elixirkoans/elixir-koans","owner":{"login":"elixirkoans","id":18631461,"avatar_url":"https://avatars.githubusercontent.com/u/18631461?v=3","gravatar_id":"","url":"https://api.github.com/users/elixirkoans","html_url":"https://github.com/elixirkoans","followers_url":"https://api.github.com/users/elixirkoans/followers","following_url":"https://api.github.com/users/elixirkoans/following{/other_user}","gists_url":"https://api.github.com/users/elixirkoans/gists{/gist_id}","starred_url":"https://api.github.com/users/elixirkoans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixirkoans/subscriptions","organizations_url":"https://api.github.com/users/elixirkoans/orgs","repos_url":"https://api.github.com/users/elixirkoans/repos","events_url":"https://api.github.com/users/elixirkoans/events{/privacy}","received_events_url":"https://api.github.com/users/elixirkoans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixirkoans/elixir-koans","description":"Elixir learning exercises","fork":false,"url":"https://api.github.com/repos/elixirkoans/elixir-koans","forks_url":"https://api.github.com/repos/elixirkoans/elixir-koans/forks","keys_url":"https://api.github.com/repos/elixirkoans/elixir-koans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixirkoans/elixir-koans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixirkoans/elixir-koans/teams","hooks_url":"https://api.github.com/repos/elixirkoans/elixir-koans/hooks","issue_events_url":"https://api.github.com/repos/elixirkoans/elixir-koans/issues/events{/number}","events_url":"https://api.github.com/repos/elixirkoans/elixir-koans/events","assignees_url":"https://api.github.com/repos/elixirkoans/elixir-koans/assignees{/user}","branches_url":"https://api.github.com/repos/elixirkoans/elixir-koans/branches{/branch}","tags_url":"https://api.github.com/repos/elixirkoans/elixir-koans/tags","blobs_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixirkoans/elixir-koans/statuses/{sha}","languages_url":"https://api.github.com/repos/elixirkoans/elixir-koans/languages","stargazers_url":"https://api.github.com/repos/elixirkoans/elixir-koans/stargazers","contributors_url":"https://api.github.com/repos/elixirkoans/elixir-koans/contributors","subscribers_url":"https://api.github.com/repos/elixirkoans/elixir-koans/subscribers","subscription_url":"https://api.github.com/repos/elixirkoans/elixir-koans/subscription","commits_url":"https://api.github.com/repos/elixirkoans/elixir-koans/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixirkoans/elixir-koans/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixirkoans/elixir-koans/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixirkoans/elixir-koans/contents/{+path}","compare_url":"https://api.github.com/repos/elixirkoans/elixir-koans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixirkoans/elixir-koans/merges","archive_url":"https://api.github.com/repos/elixirkoans/elixir-koans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixirkoans/elixir-koans/downloads","issues_url":"https://api.github.com/repos/elixirkoans/elixir-koans/issues{/number}","pulls_url":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls{/number}","milestones_url":"https://api.github.com/repos/elixirkoans/elixir-koans/milestones{/number}","notifications_url":"https://api.github.com/repos/elixirkoans/elixir-koans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixirkoans/elixir-koans/labels{/name}","releases_url":"https://api.github.com/repos/elixirkoans/elixir-koans/releases{/id}","deployments_url":"https://api.github.com/repos/elixirkoans/elixir-koans/deployments","created_at":"2015-12-16T12:47:51Z","updated_at":"2016-05-12T15:12:57Z","pushed_at":"2016-05-12T20:15:51Z","git_url":"git://github.com/elixirkoans/elixir-koans.git","ssh_url":"git@github.com:elixirkoans/elixir-koans.git","clone_url":"https://github.com/elixirkoans/elixir-koans.git","svn_url":"https://github.com/elixirkoans/elixir-koans","homepage":null,"size":211,"stargazers_count":186,"watchers_count":186,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":38,"mirror_url":null,"open_issues_count":14,"forks":38,"open_issues":14,"watchers":186,"default_branch":"master"}},"base":{"label":"elixirkoans:master","ref":"master","sha":"c23fca5b292c13904dd9a88ad775042928d89f23","user":{"login":"elixirkoans","id":18631461,"avatar_url":"https://avatars.githubusercontent.com/u/18631461?v=3","gravatar_id":"","url":"https://api.github.com/users/elixirkoans","html_url":"https://github.com/elixirkoans","followers_url":"https://api.github.com/users/elixirkoans/followers","following_url":"https://api.github.com/users/elixirkoans/following{/other_user}","gists_url":"https://api.github.com/users/elixirkoans/gists{/gist_id}","starred_url":"https://api.github.com/users/elixirkoans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixirkoans/subscriptions","organizations_url":"https://api.github.com/users/elixirkoans/orgs","repos_url":"https://api.github.com/users/elixirkoans/repos","events_url":"https://api.github.com/users/elixirkoans/events{/privacy}","received_events_url":"https://api.github.com/users/elixirkoans/received_events","type":"Organization","site_admin":false},"repo":{"id":48109902,"name":"elixir-koans","full_name":"elixirkoans/elixir-koans","owner":{"login":"elixirkoans","id":18631461,"avatar_url":"https://avatars.githubusercontent.com/u/18631461?v=3","gravatar_id":"","url":"https://api.github.com/users/elixirkoans","html_url":"https://github.com/elixirkoans","followers_url":"https://api.github.com/users/elixirkoans/followers","following_url":"https://api.github.com/users/elixirkoans/following{/other_user}","gists_url":"https://api.github.com/users/elixirkoans/gists{/gist_id}","starred_url":"https://api.github.com/users/elixirkoans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixirkoans/subscriptions","organizations_url":"https://api.github.com/users/elixirkoans/orgs","repos_url":"https://api.github.com/users/elixirkoans/repos","events_url":"https://api.github.com/users/elixirkoans/events{/privacy}","received_events_url":"https://api.github.com/users/elixirkoans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixirkoans/elixir-koans","description":"Elixir learning exercises","fork":false,"url":"https://api.github.com/repos/elixirkoans/elixir-koans","forks_url":"https://api.github.com/repos/elixirkoans/elixir-koans/forks","keys_url":"https://api.github.com/repos/elixirkoans/elixir-koans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixirkoans/elixir-koans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixirkoans/elixir-koans/teams","hooks_url":"https://api.github.com/repos/elixirkoans/elixir-koans/hooks","issue_events_url":"https://api.github.com/repos/elixirkoans/elixir-koans/issues/events{/number}","events_url":"https://api.github.com/repos/elixirkoans/elixir-koans/events","assignees_url":"https://api.github.com/repos/elixirkoans/elixir-koans/assignees{/user}","branches_url":"https://api.github.com/repos/elixirkoans/elixir-koans/branches{/branch}","tags_url":"https://api.github.com/repos/elixirkoans/elixir-koans/tags","blobs_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixirkoans/elixir-koans/statuses/{sha}","languages_url":"https://api.github.com/repos/elixirkoans/elixir-koans/languages","stargazers_url":"https://api.github.com/repos/elixirkoans/elixir-koans/stargazers","contributors_url":"https://api.github.com/repos/elixirkoans/elixir-koans/contributors","subscribers_url":"https://api.github.com/repos/elixirkoans/elixir-koans/subscribers","subscription_url":"https://api.github.com/repos/elixirkoans/elixir-koans/subscription","commits_url":"https://api.github.com/repos/elixirkoans/elixir-koans/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixirkoans/elixir-koans/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixirkoans/elixir-koans/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixirkoans/elixir-koans/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixirkoans/elixir-koans/contents/{+path}","compare_url":"https://api.github.com/repos/elixirkoans/elixir-koans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixirkoans/elixir-koans/merges","archive_url":"https://api.github.com/repos/elixirkoans/elixir-koans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixirkoans/elixir-koans/downloads","issues_url":"https://api.github.com/repos/elixirkoans/elixir-koans/issues{/number}","pulls_url":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls{/number}","milestones_url":"https://api.github.com/repos/elixirkoans/elixir-koans/milestones{/number}","notifications_url":"https://api.github.com/repos/elixirkoans/elixir-koans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixirkoans/elixir-koans/labels{/name}","releases_url":"https://api.github.com/repos/elixirkoans/elixir-koans/releases{/id}","deployments_url":"https://api.github.com/repos/elixirkoans/elixir-koans/deployments","created_at":"2015-12-16T12:47:51Z","updated_at":"2016-05-12T15:12:57Z","pushed_at":"2016-05-12T20:15:51Z","git_url":"git://github.com/elixirkoans/elixir-koans.git","ssh_url":"git@github.com:elixirkoans/elixir-koans.git","clone_url":"https://github.com/elixirkoans/elixir-koans.git","svn_url":"https://github.com/elixirkoans/elixir-koans","homepage":null,"size":211,"stargazers_count":186,"watchers_count":186,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":38,"mirror_url":null,"open_issues_count":14,"forks":38,"open_issues":14,"watchers":186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/116"},"html":{"href":"https://github.com/elixirkoans/elixir-koans/pull/116"},"issue":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/issues/116"},"comments":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/issues/116/comments"},"review_comments":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/116/comments"},"review_comment":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/pulls/116/commits"},"statuses":{"href":"https://api.github.com/repos/elixirkoans/elixir-koans/statuses/d93b7fa0f53c01a4426eb4f6dcbf03f68131536c"}}}}