{"action":"created","comment":{"url":"https://api.github.com/repos/mbj/mutant/pulls/comments/49381193","id":49381193,"diff_hunk":"@@ -40,11 +40,11 @@ def original_source\n \n     # Test if mutation is killed by test reports\n     #\n-    # @param [Array<Report::Test>] test_reports\n+    # @param [Result::Test] test_result\n     #\n     # @return [Boolean]\n-    def self.success?(test_result)\n-      self::TEST_PASS_SUCCESS.equal?(test_result.passed)\n+    def success?(test_result)","path":"lib/mutant/mutation.rb","position":10,"original_position":10,"commit_id":"c5583d2c1fabfc627b30adfba9b15e264b2487fa","original_commit_id":"5b590940f43317ad13053c5a0352f2a09e9362d7","user":{"login":"dkubb","id":133,"avatar_url":"https://avatars.githubusercontent.com/u/133?v=3","gravatar_id":"","url":"https://api.github.com/users/dkubb","html_url":"https://github.com/dkubb","followers_url":"https://api.github.com/users/dkubb/followers","following_url":"https://api.github.com/users/dkubb/following{/other_user}","gists_url":"https://api.github.com/users/dkubb/gists{/gist_id}","starred_url":"https://api.github.com/users/dkubb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkubb/subscriptions","organizations_url":"https://api.github.com/users/dkubb/orgs","repos_url":"https://api.github.com/users/dkubb/repos","events_url":"https://api.github.com/users/dkubb/events{/privacy}","received_events_url":"https://api.github.com/users/dkubb/received_events","type":"User","site_admin":false},"body":"> It is de-facto using instance state self.class:: for looking up a constant relative to the instances class.\r\n\r\nWell, sort of. It doesn't require instance state. You could make due with class state.\r\n\r\nAlso I wasn't factoring in the constant at all. That isn't relevant imho. My primary consideration is if actual instance state is used or not. If it's not, then the method should be a singleton method.\r\n\r\nMy point in flagging this is that when you could rewrite the method as the following and still have it pass, then maybe it shouldn't be an instance method:\r\n\r\n```ruby\r\ndef success?(test_result)\r\n  self.class.success?(test_result)\r\nend\r\n\r\ndef self.success?(test_result)\r\n  self::TEST_PASS_SUCCESS.equal?(test_result.passed)\r\nend\r\n```\r\n\r\nYou could also just use `delegate :success?, to: self`if you had a delegation helper.\r\n","created_at":"2016-01-11T21:27:31Z","updated_at":"2016-01-11T21:27:31Z","html_url":"https://github.com/mbj/mutant/pull/514#discussion_r49381193","pull_request_url":"https://api.github.com/repos/mbj/mutant/pulls/514","_links":{"self":{"href":"https://api.github.com/repos/mbj/mutant/pulls/comments/49381193"},"html":{"href":"https://github.com/mbj/mutant/pull/514#discussion_r49381193"},"pull_request":{"href":"https://api.github.com/repos/mbj/mutant/pulls/514"}}},"pull_request":{"url":"https://api.github.com/repos/mbj/mutant/pulls/514","id":55551066,"html_url":"https://github.com/mbj/mutant/pull/514","diff_url":"https://github.com/mbj/mutant/pull/514.diff","patch_url":"https://github.com/mbj/mutant/pull/514.patch","issue_url":"https://api.github.com/repos/mbj/mutant/issues/514","number":514,"state":"open","locked":false,"title":"Fix coverage of Mutant::Result namespace","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-09T21:15:49Z","updated_at":"2016-01-11T21:27:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fa49d5e16730fcc222c32945bf9a2c2c5853ab0","assignee":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mbj/mutant/pulls/514/commits","review_comments_url":"https://api.github.com/repos/mbj/mutant/pulls/514/comments","review_comment_url":"https://api.github.com/repos/mbj/mutant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mbj/mutant/issues/514/comments","statuses_url":"https://api.github.com/repos/mbj/mutant/statuses/c5583d2c1fabfc627b30adfba9b15e264b2487fa","head":{"label":"mbj:fix/result-coverage","ref":"fix/result-coverage","sha":"c5583d2c1fabfc627b30adfba9b15e264b2487fa","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"repo":{"id":5152718,"name":"mutant","full_name":"mbj/mutant","owner":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbj/mutant","description":"Mutation testing for Ruby","fork":false,"url":"https://api.github.com/repos/mbj/mutant","forks_url":"https://api.github.com/repos/mbj/mutant/forks","keys_url":"https://api.github.com/repos/mbj/mutant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbj/mutant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbj/mutant/teams","hooks_url":"https://api.github.com/repos/mbj/mutant/hooks","issue_events_url":"https://api.github.com/repos/mbj/mutant/issues/events{/number}","events_url":"https://api.github.com/repos/mbj/mutant/events","assignees_url":"https://api.github.com/repos/mbj/mutant/assignees{/user}","branches_url":"https://api.github.com/repos/mbj/mutant/branches{/branch}","tags_url":"https://api.github.com/repos/mbj/mutant/tags","blobs_url":"https://api.github.com/repos/mbj/mutant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbj/mutant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbj/mutant/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbj/mutant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbj/mutant/statuses/{sha}","languages_url":"https://api.github.com/repos/mbj/mutant/languages","stargazers_url":"https://api.github.com/repos/mbj/mutant/stargazers","contributors_url":"https://api.github.com/repos/mbj/mutant/contributors","subscribers_url":"https://api.github.com/repos/mbj/mutant/subscribers","subscription_url":"https://api.github.com/repos/mbj/mutant/subscription","commits_url":"https://api.github.com/repos/mbj/mutant/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbj/mutant/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbj/mutant/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbj/mutant/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbj/mutant/contents/{+path}","compare_url":"https://api.github.com/repos/mbj/mutant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbj/mutant/merges","archive_url":"https://api.github.com/repos/mbj/mutant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbj/mutant/downloads","issues_url":"https://api.github.com/repos/mbj/mutant/issues{/number}","pulls_url":"https://api.github.com/repos/mbj/mutant/pulls{/number}","milestones_url":"https://api.github.com/repos/mbj/mutant/milestones{/number}","notifications_url":"https://api.github.com/repos/mbj/mutant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbj/mutant/labels{/name}","releases_url":"https://api.github.com/repos/mbj/mutant/releases{/id}","created_at":"2012-07-23T14:18:46Z","updated_at":"2016-01-11T15:17:18Z","pushed_at":"2016-01-11T20:39:18Z","git_url":"git://github.com/mbj/mutant.git","ssh_url":"git@github.com:mbj/mutant.git","clone_url":"https://github.com/mbj/mutant.git","svn_url":"https://github.com/mbj/mutant","homepage":"","size":3668,"stargazers_count":974,"watchers_count":974,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":95,"forks":65,"open_issues":95,"watchers":974,"default_branch":"master"}},"base":{"label":"mbj:master","ref":"master","sha":"6d8f28e1cf6644c6a143aba0b737173447ed3650","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"repo":{"id":5152718,"name":"mutant","full_name":"mbj/mutant","owner":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbj/mutant","description":"Mutation testing for Ruby","fork":false,"url":"https://api.github.com/repos/mbj/mutant","forks_url":"https://api.github.com/repos/mbj/mutant/forks","keys_url":"https://api.github.com/repos/mbj/mutant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbj/mutant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbj/mutant/teams","hooks_url":"https://api.github.com/repos/mbj/mutant/hooks","issue_events_url":"https://api.github.com/repos/mbj/mutant/issues/events{/number}","events_url":"https://api.github.com/repos/mbj/mutant/events","assignees_url":"https://api.github.com/repos/mbj/mutant/assignees{/user}","branches_url":"https://api.github.com/repos/mbj/mutant/branches{/branch}","tags_url":"https://api.github.com/repos/mbj/mutant/tags","blobs_url":"https://api.github.com/repos/mbj/mutant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbj/mutant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbj/mutant/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbj/mutant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbj/mutant/statuses/{sha}","languages_url":"https://api.github.com/repos/mbj/mutant/languages","stargazers_url":"https://api.github.com/repos/mbj/mutant/stargazers","contributors_url":"https://api.github.com/repos/mbj/mutant/contributors","subscribers_url":"https://api.github.com/repos/mbj/mutant/subscribers","subscription_url":"https://api.github.com/repos/mbj/mutant/subscription","commits_url":"https://api.github.com/repos/mbj/mutant/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbj/mutant/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbj/mutant/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbj/mutant/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbj/mutant/contents/{+path}","compare_url":"https://api.github.com/repos/mbj/mutant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbj/mutant/merges","archive_url":"https://api.github.com/repos/mbj/mutant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbj/mutant/downloads","issues_url":"https://api.github.com/repos/mbj/mutant/issues{/number}","pulls_url":"https://api.github.com/repos/mbj/mutant/pulls{/number}","milestones_url":"https://api.github.com/repos/mbj/mutant/milestones{/number}","notifications_url":"https://api.github.com/repos/mbj/mutant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbj/mutant/labels{/name}","releases_url":"https://api.github.com/repos/mbj/mutant/releases{/id}","created_at":"2012-07-23T14:18:46Z","updated_at":"2016-01-11T15:17:18Z","pushed_at":"2016-01-11T20:39:18Z","git_url":"git://github.com/mbj/mutant.git","ssh_url":"git@github.com:mbj/mutant.git","clone_url":"https://github.com/mbj/mutant.git","svn_url":"https://github.com/mbj/mutant","homepage":"","size":3668,"stargazers_count":974,"watchers_count":974,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":95,"forks":65,"open_issues":95,"watchers":974,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mbj/mutant/pulls/514"},"html":{"href":"https://github.com/mbj/mutant/pull/514"},"issue":{"href":"https://api.github.com/repos/mbj/mutant/issues/514"},"comments":{"href":"https://api.github.com/repos/mbj/mutant/issues/514/comments"},"review_comments":{"href":"https://api.github.com/repos/mbj/mutant/pulls/514/comments"},"review_comment":{"href":"https://api.github.com/repos/mbj/mutant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mbj/mutant/pulls/514/commits"},"statuses":{"href":"https://api.github.com/repos/mbj/mutant/statuses/c5583d2c1fabfc627b30adfba9b15e264b2487fa"}}}}