{"action":"created","comment":{"url":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/comments/33572911","id":33572911,"diff_hunk":"@@ -528,6 +528,34 @@ problem. A known exception to this rule is in a Gems gemspec file.\n   end\n   ```\n \n+* <a name=\"explicitly-access-class-methods\"></a>\n+  Prefer explicitly accessing class methods with self.class.\n+<sup>[[link](#explicitly-access-class-methods)]</sup>\n+\n+  ```Ruby\n+  # bad\n+  class Person\n+    def self.some_method\n+      self.an_instance_method\n+    end\n+\n+    def self.an_instance_method","path":"README.md","position":15,"original_position":15,"commit_id":"416a57e01bcfbe9e7574a6ba94b05e6eb468bc60","original_commit_id":"416a57e01bcfbe9e7574a6ba94b05e6eb468bc60","user":{"login":"clarkbremer","id":3091808,"avatar_url":"https://avatars.githubusercontent.com/u/3091808?v=3","gravatar_id":"","url":"https://api.github.com/users/clarkbremer","html_url":"https://github.com/clarkbremer","followers_url":"https://api.github.com/users/clarkbremer/followers","following_url":"https://api.github.com/users/clarkbremer/following{/other_user}","gists_url":"https://api.github.com/users/clarkbremer/gists{/gist_id}","starred_url":"https://api.github.com/users/clarkbremer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clarkbremer/subscriptions","organizations_url":"https://api.github.com/users/clarkbremer/orgs","repos_url":"https://api.github.com/users/clarkbremer/repos","events_url":"https://api.github.com/users/clarkbremer/events{/privacy}","received_events_url":"https://api.github.com/users/clarkbremer/received_events","type":"User","site_admin":false},"body":"Looks like another class method.","created_at":"2015-06-30T13:39:09Z","updated_at":"2015-06-30T13:39:09Z","html_url":"https://github.com/reachlocal/ruby-style-guide/pull/11#discussion_r33572911","pull_request_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/comments/33572911"},"html":{"href":"https://github.com/reachlocal/ruby-style-guide/pull/11#discussion_r33572911"},"pull_request":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/11","id":38827000,"html_url":"https://github.com/reachlocal/ruby-style-guide/pull/11","diff_url":"https://github.com/reachlocal/ruby-style-guide/pull/11.diff","patch_url":"https://github.com/reachlocal/ruby-style-guide/pull/11.patch","issue_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues/11","number":11,"state":"open","locked":false,"title":"Explicit use of `self.class.` for calling class methods.","user":{"login":"jwreachlocal","id":3331444,"avatar_url":"https://avatars.githubusercontent.com/u/3331444?v=3","gravatar_id":"","url":"https://api.github.com/users/jwreachlocal","html_url":"https://github.com/jwreachlocal","followers_url":"https://api.github.com/users/jwreachlocal/followers","following_url":"https://api.github.com/users/jwreachlocal/following{/other_user}","gists_url":"https://api.github.com/users/jwreachlocal/gists{/gist_id}","starred_url":"https://api.github.com/users/jwreachlocal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwreachlocal/subscriptions","organizations_url":"https://api.github.com/users/jwreachlocal/orgs","repos_url":"https://api.github.com/users/jwreachlocal/repos","events_url":"https://api.github.com/users/jwreachlocal/events{/privacy}","received_events_url":"https://api.github.com/users/jwreachlocal/received_events","type":"User","site_admin":false},"body":"Since we should be using `self.` when calling instance methods, it only makes sense we should use `self.class.` when calling class methods.","created_at":"2015-06-29T23:00:27Z","updated_at":"2015-06-30T13:39:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3e197e3174a7119ed45755d96bc93673ae25b35","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/11/commits","review_comments_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/11/comments","review_comment_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues/11/comments","statuses_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/statuses/416a57e01bcfbe9e7574a6ba94b05e6eb468bc60","head":{"label":"reachlocal:calling_class_level_methods","ref":"calling_class_level_methods","sha":"416a57e01bcfbe9e7574a6ba94b05e6eb468bc60","user":{"login":"reachlocal","id":2439204,"avatar_url":"https://avatars.githubusercontent.com/u/2439204?v=3","gravatar_id":"","url":"https://api.github.com/users/reachlocal","html_url":"https://github.com/reachlocal","followers_url":"https://api.github.com/users/reachlocal/followers","following_url":"https://api.github.com/users/reachlocal/following{/other_user}","gists_url":"https://api.github.com/users/reachlocal/gists{/gist_id}","starred_url":"https://api.github.com/users/reachlocal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reachlocal/subscriptions","organizations_url":"https://api.github.com/users/reachlocal/orgs","repos_url":"https://api.github.com/users/reachlocal/repos","events_url":"https://api.github.com/users/reachlocal/events{/privacy}","received_events_url":"https://api.github.com/users/reachlocal/received_events","type":"Organization","site_admin":false},"repo":{"id":22187576,"name":"ruby-style-guide","full_name":"reachlocal/ruby-style-guide","owner":{"login":"reachlocal","id":2439204,"avatar_url":"https://avatars.githubusercontent.com/u/2439204?v=3","gravatar_id":"","url":"https://api.github.com/users/reachlocal","html_url":"https://github.com/reachlocal","followers_url":"https://api.github.com/users/reachlocal/followers","following_url":"https://api.github.com/users/reachlocal/following{/other_user}","gists_url":"https://api.github.com/users/reachlocal/gists{/gist_id}","starred_url":"https://api.github.com/users/reachlocal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reachlocal/subscriptions","organizations_url":"https://api.github.com/users/reachlocal/orgs","repos_url":"https://api.github.com/users/reachlocal/repos","events_url":"https://api.github.com/users/reachlocal/events{/privacy}","received_events_url":"https://api.github.com/users/reachlocal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reachlocal/ruby-style-guide","description":"This is the Ruby style guide for developers at ReachLocal","fork":false,"url":"https://api.github.com/repos/reachlocal/ruby-style-guide","forks_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/forks","keys_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/teams","hooks_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/hooks","issue_events_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues/events{/number}","events_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/events","assignees_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/assignees{/user}","branches_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/branches{/branch}","tags_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/tags","blobs_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/languages","stargazers_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/stargazers","contributors_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/contributors","subscribers_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/subscribers","subscription_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/subscription","commits_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/contents/{+path}","compare_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/merges","archive_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/downloads","issues_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues{/number}","pulls_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/labels{/name}","releases_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/releases{/id}","created_at":"2014-07-24T00:04:51Z","updated_at":"2014-09-26T09:45:14Z","pushed_at":"2015-06-29T23:00:27Z","git_url":"git://github.com/reachlocal/ruby-style-guide.git","ssh_url":"git@github.com:reachlocal/ruby-style-guide.git","clone_url":"https://github.com/reachlocal/ruby-style-guide.git","svn_url":"https://github.com/reachlocal/ruby-style-guide","homepage":null,"size":268,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"reachlocal:master","ref":"master","sha":"58799550976c4eb15c13207892d6c5ee6b948ffb","user":{"login":"reachlocal","id":2439204,"avatar_url":"https://avatars.githubusercontent.com/u/2439204?v=3","gravatar_id":"","url":"https://api.github.com/users/reachlocal","html_url":"https://github.com/reachlocal","followers_url":"https://api.github.com/users/reachlocal/followers","following_url":"https://api.github.com/users/reachlocal/following{/other_user}","gists_url":"https://api.github.com/users/reachlocal/gists{/gist_id}","starred_url":"https://api.github.com/users/reachlocal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reachlocal/subscriptions","organizations_url":"https://api.github.com/users/reachlocal/orgs","repos_url":"https://api.github.com/users/reachlocal/repos","events_url":"https://api.github.com/users/reachlocal/events{/privacy}","received_events_url":"https://api.github.com/users/reachlocal/received_events","type":"Organization","site_admin":false},"repo":{"id":22187576,"name":"ruby-style-guide","full_name":"reachlocal/ruby-style-guide","owner":{"login":"reachlocal","id":2439204,"avatar_url":"https://avatars.githubusercontent.com/u/2439204?v=3","gravatar_id":"","url":"https://api.github.com/users/reachlocal","html_url":"https://github.com/reachlocal","followers_url":"https://api.github.com/users/reachlocal/followers","following_url":"https://api.github.com/users/reachlocal/following{/other_user}","gists_url":"https://api.github.com/users/reachlocal/gists{/gist_id}","starred_url":"https://api.github.com/users/reachlocal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reachlocal/subscriptions","organizations_url":"https://api.github.com/users/reachlocal/orgs","repos_url":"https://api.github.com/users/reachlocal/repos","events_url":"https://api.github.com/users/reachlocal/events{/privacy}","received_events_url":"https://api.github.com/users/reachlocal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reachlocal/ruby-style-guide","description":"This is the Ruby style guide for developers at ReachLocal","fork":false,"url":"https://api.github.com/repos/reachlocal/ruby-style-guide","forks_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/forks","keys_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/teams","hooks_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/hooks","issue_events_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues/events{/number}","events_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/events","assignees_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/assignees{/user}","branches_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/branches{/branch}","tags_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/tags","blobs_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/languages","stargazers_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/stargazers","contributors_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/contributors","subscribers_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/subscribers","subscription_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/subscription","commits_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/contents/{+path}","compare_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/merges","archive_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/downloads","issues_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues{/number}","pulls_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/labels{/name}","releases_url":"https://api.github.com/repos/reachlocal/ruby-style-guide/releases{/id}","created_at":"2014-07-24T00:04:51Z","updated_at":"2014-09-26T09:45:14Z","pushed_at":"2015-06-29T23:00:27Z","git_url":"git://github.com/reachlocal/ruby-style-guide.git","ssh_url":"git@github.com:reachlocal/ruby-style-guide.git","clone_url":"https://github.com/reachlocal/ruby-style-guide.git","svn_url":"https://github.com/reachlocal/ruby-style-guide","homepage":null,"size":268,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/11"},"html":{"href":"https://github.com/reachlocal/ruby-style-guide/pull/11"},"issue":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues/11"},"comments":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/reachlocal/ruby-style-guide/statuses/416a57e01bcfbe9e7574a6ba94b05e6eb468bc60"}}}}