{"action":"created","comment":{"url":"https://api.github.com/repos/rwalters/prime_patterns/pulls/comments/29208617","id":29208617,"diff_hunk":"@@ -1,8 +1,8 @@\n-require 'strategies'\n+require_relative 'strategies'\n \n class PrimeByStrategy\n-  def is_prime?(input, strategies = Strategies::PRIME_STRATEGIES.map(&:new))\n-    return false if strategies.any?{|s| s.not_prime?(input)}\n-    return true\n+  def is_prime?(input)\n+    !Strategies::PRIME_STRATEGIES.map { |strategy| strategy.new(input) }\n+    .any?(&:not_prime?)","path":"lib/prime_by_strategy.rb","position":10,"original_position":10,"commit_id":"974471265736c1aebe3e60547c5da948b497b7ee","original_commit_id":"974471265736c1aebe3e60547c5da948b497b7ee","user":{"login":"johnnymo87","id":3466499,"avatar_url":"https://avatars.githubusercontent.com/u/3466499?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnymo87","html_url":"https://github.com/johnnymo87","followers_url":"https://api.github.com/users/johnnymo87/followers","following_url":"https://api.github.com/users/johnnymo87/following{/other_user}","gists_url":"https://api.github.com/users/johnnymo87/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnymo87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnymo87/subscriptions","organizations_url":"https://api.github.com/users/johnnymo87/orgs","repos_url":"https://api.github.com/users/johnnymo87/repos","events_url":"https://api.github.com/users/johnnymo87/events{/privacy}","received_events_url":"https://api.github.com/users/johnnymo87/received_events","type":"User","site_admin":false},"body":"return false if any strategies are not prime `==` return true if all strategies are prime.\r\n\r\n[Commit to demo](https://github.com/johnnymo87/prime_patterns/commit/de6d24976d5b686e4e09760c779134c5ffa245d0)\r\n\r\n\r\n","created_at":"2015-04-28T01:42:14Z","updated_at":"2015-04-28T01:42:14Z","html_url":"https://github.com/rwalters/prime_patterns/pull/1#discussion_r29208617","pull_request_url":"https://api.github.com/repos/rwalters/prime_patterns/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/rwalters/prime_patterns/pulls/comments/29208617"},"html":{"href":"https://github.com/rwalters/prime_patterns/pull/1#discussion_r29208617"},"pull_request":{"href":"https://api.github.com/repos/rwalters/prime_patterns/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/rwalters/prime_patterns/pulls/1","id":34225515,"html_url":"https://github.com/rwalters/prime_patterns/pull/1","diff_url":"https://github.com/rwalters/prime_patterns/pull/1.diff","patch_url":"https://github.com/rwalters/prime_patterns/pull/1.patch","issue_url":"https://api.github.com/repos/rwalters/prime_patterns/issues/1","number":1,"state":"open","locked":false,"title":"Refactoring","user":{"login":"cored","id":11719,"avatar_url":"https://avatars.githubusercontent.com/u/11719?v=3","gravatar_id":"","url":"https://api.github.com/users/cored","html_url":"https://github.com/cored","followers_url":"https://api.github.com/users/cored/followers","following_url":"https://api.github.com/users/cored/following{/other_user}","gists_url":"https://api.github.com/users/cored/gists{/gist_id}","starred_url":"https://api.github.com/users/cored/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cored/subscriptions","organizations_url":"https://api.github.com/users/cored/orgs","repos_url":"https://api.github.com/users/cored/repos","events_url":"https://api.github.com/users/cored/events{/privacy}","received_events_url":"https://api.github.com/users/cored/received_events","type":"User","site_admin":false},"body":"I did some refactoring to your first implementation so we can keep the discussion going. Let me know what you think.","created_at":"2015-04-28T01:07:38Z","updated_at":"2015-04-28T01:42:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fcfa49dbad9b2e2945afc5f820fc31341c9a9c87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rwalters/prime_patterns/pulls/1/commits","review_comments_url":"https://api.github.com/repos/rwalters/prime_patterns/pulls/1/comments","review_comment_url":"https://api.github.com/repos/rwalters/prime_patterns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rwalters/prime_patterns/issues/1/comments","statuses_url":"https://api.github.com/repos/rwalters/prime_patterns/statuses/974471265736c1aebe3e60547c5da948b497b7ee","head":{"label":"cored:refactoring","ref":"refactoring","sha":"974471265736c1aebe3e60547c5da948b497b7ee","user":{"login":"cored","id":11719,"avatar_url":"https://avatars.githubusercontent.com/u/11719?v=3","gravatar_id":"","url":"https://api.github.com/users/cored","html_url":"https://github.com/cored","followers_url":"https://api.github.com/users/cored/followers","following_url":"https://api.github.com/users/cored/following{/other_user}","gists_url":"https://api.github.com/users/cored/gists{/gist_id}","starred_url":"https://api.github.com/users/cored/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cored/subscriptions","organizations_url":"https://api.github.com/users/cored/orgs","repos_url":"https://api.github.com/users/cored/repos","events_url":"https://api.github.com/users/cored/events{/privacy}","received_events_url":"https://api.github.com/users/cored/received_events","type":"User","site_admin":false},"repo":{"id":34699483,"name":"prime_patterns","full_name":"cored/prime_patterns","owner":{"login":"cored","id":11719,"avatar_url":"https://avatars.githubusercontent.com/u/11719?v=3","gravatar_id":"","url":"https://api.github.com/users/cored","html_url":"https://github.com/cored","followers_url":"https://api.github.com/users/cored/followers","following_url":"https://api.github.com/users/cored/following{/other_user}","gists_url":"https://api.github.com/users/cored/gists{/gist_id}","starred_url":"https://api.github.com/users/cored/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cored/subscriptions","organizations_url":"https://api.github.com/users/cored/orgs","repos_url":"https://api.github.com/users/cored/repos","events_url":"https://api.github.com/users/cored/events{/privacy}","received_events_url":"https://api.github.com/users/cored/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cored/prime_patterns","description":"An exploration of a few software design patterns using a kata of whether a number is prime.","fork":true,"url":"https://api.github.com/repos/cored/prime_patterns","forks_url":"https://api.github.com/repos/cored/prime_patterns/forks","keys_url":"https://api.github.com/repos/cored/prime_patterns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cored/prime_patterns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cored/prime_patterns/teams","hooks_url":"https://api.github.com/repos/cored/prime_patterns/hooks","issue_events_url":"https://api.github.com/repos/cored/prime_patterns/issues/events{/number}","events_url":"https://api.github.com/repos/cored/prime_patterns/events","assignees_url":"https://api.github.com/repos/cored/prime_patterns/assignees{/user}","branches_url":"https://api.github.com/repos/cored/prime_patterns/branches{/branch}","tags_url":"https://api.github.com/repos/cored/prime_patterns/tags","blobs_url":"https://api.github.com/repos/cored/prime_patterns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cored/prime_patterns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cored/prime_patterns/git/refs{/sha}","trees_url":"https://api.github.com/repos/cored/prime_patterns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cored/prime_patterns/statuses/{sha}","languages_url":"https://api.github.com/repos/cored/prime_patterns/languages","stargazers_url":"https://api.github.com/repos/cored/prime_patterns/stargazers","contributors_url":"https://api.github.com/repos/cored/prime_patterns/contributors","subscribers_url":"https://api.github.com/repos/cored/prime_patterns/subscribers","subscription_url":"https://api.github.com/repos/cored/prime_patterns/subscription","commits_url":"https://api.github.com/repos/cored/prime_patterns/commits{/sha}","git_commits_url":"https://api.github.com/repos/cored/prime_patterns/git/commits{/sha}","comments_url":"https://api.github.com/repos/cored/prime_patterns/comments{/number}","issue_comment_url":"https://api.github.com/repos/cored/prime_patterns/issues/comments{/number}","contents_url":"https://api.github.com/repos/cored/prime_patterns/contents/{+path}","compare_url":"https://api.github.com/repos/cored/prime_patterns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cored/prime_patterns/merges","archive_url":"https://api.github.com/repos/cored/prime_patterns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cored/prime_patterns/downloads","issues_url":"https://api.github.com/repos/cored/prime_patterns/issues{/number}","pulls_url":"https://api.github.com/repos/cored/prime_patterns/pulls{/number}","milestones_url":"https://api.github.com/repos/cored/prime_patterns/milestones{/number}","notifications_url":"https://api.github.com/repos/cored/prime_patterns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cored/prime_patterns/labels{/name}","releases_url":"https://api.github.com/repos/cored/prime_patterns/releases{/id}","created_at":"2015-04-28T00:53:30Z","updated_at":"2015-04-28T00:53:31Z","pushed_at":"2015-04-28T01:06:41Z","git_url":"git://github.com/cored/prime_patterns.git","ssh_url":"git@github.com:cored/prime_patterns.git","clone_url":"https://github.com/cored/prime_patterns.git","svn_url":"https://github.com/cored/prime_patterns","homepage":"","size":256,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rwalters:master","ref":"master","sha":"58f5993d590ec724b0d9b8b05914d8ea2ee79e10","user":{"login":"rwalters","id":1234038,"avatar_url":"https://avatars.githubusercontent.com/u/1234038?v=3","gravatar_id":"","url":"https://api.github.com/users/rwalters","html_url":"https://github.com/rwalters","followers_url":"https://api.github.com/users/rwalters/followers","following_url":"https://api.github.com/users/rwalters/following{/other_user}","gists_url":"https://api.github.com/users/rwalters/gists{/gist_id}","starred_url":"https://api.github.com/users/rwalters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwalters/subscriptions","organizations_url":"https://api.github.com/users/rwalters/orgs","repos_url":"https://api.github.com/users/rwalters/repos","events_url":"https://api.github.com/users/rwalters/events{/privacy}","received_events_url":"https://api.github.com/users/rwalters/received_events","type":"User","site_admin":false},"repo":{"id":32554922,"name":"prime_patterns","full_name":"rwalters/prime_patterns","owner":{"login":"rwalters","id":1234038,"avatar_url":"https://avatars.githubusercontent.com/u/1234038?v=3","gravatar_id":"","url":"https://api.github.com/users/rwalters","html_url":"https://github.com/rwalters","followers_url":"https://api.github.com/users/rwalters/followers","following_url":"https://api.github.com/users/rwalters/following{/other_user}","gists_url":"https://api.github.com/users/rwalters/gists{/gist_id}","starred_url":"https://api.github.com/users/rwalters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwalters/subscriptions","organizations_url":"https://api.github.com/users/rwalters/orgs","repos_url":"https://api.github.com/users/rwalters/repos","events_url":"https://api.github.com/users/rwalters/events{/privacy}","received_events_url":"https://api.github.com/users/rwalters/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rwalters/prime_patterns","description":"An exploration of a few software design patterns using a kata of whether a number is prime.","fork":false,"url":"https://api.github.com/repos/rwalters/prime_patterns","forks_url":"https://api.github.com/repos/rwalters/prime_patterns/forks","keys_url":"https://api.github.com/repos/rwalters/prime_patterns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rwalters/prime_patterns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rwalters/prime_patterns/teams","hooks_url":"https://api.github.com/repos/rwalters/prime_patterns/hooks","issue_events_url":"https://api.github.com/repos/rwalters/prime_patterns/issues/events{/number}","events_url":"https://api.github.com/repos/rwalters/prime_patterns/events","assignees_url":"https://api.github.com/repos/rwalters/prime_patterns/assignees{/user}","branches_url":"https://api.github.com/repos/rwalters/prime_patterns/branches{/branch}","tags_url":"https://api.github.com/repos/rwalters/prime_patterns/tags","blobs_url":"https://api.github.com/repos/rwalters/prime_patterns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rwalters/prime_patterns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rwalters/prime_patterns/git/refs{/sha}","trees_url":"https://api.github.com/repos/rwalters/prime_patterns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rwalters/prime_patterns/statuses/{sha}","languages_url":"https://api.github.com/repos/rwalters/prime_patterns/languages","stargazers_url":"https://api.github.com/repos/rwalters/prime_patterns/stargazers","contributors_url":"https://api.github.com/repos/rwalters/prime_patterns/contributors","subscribers_url":"https://api.github.com/repos/rwalters/prime_patterns/subscribers","subscription_url":"https://api.github.com/repos/rwalters/prime_patterns/subscription","commits_url":"https://api.github.com/repos/rwalters/prime_patterns/commits{/sha}","git_commits_url":"https://api.github.com/repos/rwalters/prime_patterns/git/commits{/sha}","comments_url":"https://api.github.com/repos/rwalters/prime_patterns/comments{/number}","issue_comment_url":"https://api.github.com/repos/rwalters/prime_patterns/issues/comments{/number}","contents_url":"https://api.github.com/repos/rwalters/prime_patterns/contents/{+path}","compare_url":"https://api.github.com/repos/rwalters/prime_patterns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rwalters/prime_patterns/merges","archive_url":"https://api.github.com/repos/rwalters/prime_patterns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rwalters/prime_patterns/downloads","issues_url":"https://api.github.com/repos/rwalters/prime_patterns/issues{/number}","pulls_url":"https://api.github.com/repos/rwalters/prime_patterns/pulls{/number}","milestones_url":"https://api.github.com/repos/rwalters/prime_patterns/milestones{/number}","notifications_url":"https://api.github.com/repos/rwalters/prime_patterns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rwalters/prime_patterns/labels{/name}","releases_url":"https://api.github.com/repos/rwalters/prime_patterns/releases{/id}","created_at":"2015-03-20T01:06:00Z","updated_at":"2015-04-22T19:55:37Z","pushed_at":"2015-04-28T01:07:40Z","git_url":"git://github.com/rwalters/prime_patterns.git","ssh_url":"git@github.com:rwalters/prime_patterns.git","clone_url":"https://github.com/rwalters/prime_patterns.git","svn_url":"https://github.com/rwalters/prime_patterns","homepage":"","size":256,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rwalters/prime_patterns/pulls/1"},"html":{"href":"https://github.com/rwalters/prime_patterns/pull/1"},"issue":{"href":"https://api.github.com/repos/rwalters/prime_patterns/issues/1"},"comments":{"href":"https://api.github.com/repos/rwalters/prime_patterns/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/rwalters/prime_patterns/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/rwalters/prime_patterns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rwalters/prime_patterns/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/rwalters/prime_patterns/statuses/974471265736c1aebe3e60547c5da948b497b7ee"}}}}