{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/form-linter/pulls/comments/63539963","id":63539963,"diff_hunk":"@@ -0,0 +1,15 @@\n+class FormFinder\n+  def initialize(page)\n+    @page = page\n+  end\n+\n+  def find\n+    page.css(\"form\").first.to_s\n+  end\n+\n+  private\n+\n+  def page\n+    Nokogiri::HTML(@page)","path":"app/models/form_finder.rb","position":13,"original_position":13,"commit_id":"720ba7fdde8b6590584d4dac74aa485e1b811dea","original_commit_id":"720ba7fdde8b6590584d4dac74aa485e1b811dea","user":{"login":"seanpdoyle","id":2575027,"avatar_url":"https://avatars.githubusercontent.com/u/2575027?v=3","gravatar_id":"","url":"https://api.github.com/users/seanpdoyle","html_url":"https://github.com/seanpdoyle","followers_url":"https://api.github.com/users/seanpdoyle/followers","following_url":"https://api.github.com/users/seanpdoyle/following{/other_user}","gists_url":"https://api.github.com/users/seanpdoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/seanpdoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanpdoyle/subscriptions","organizations_url":"https://api.github.com/users/seanpdoyle/orgs","repos_url":"https://api.github.com/users/seanpdoyle/repos","events_url":"https://api.github.com/users/seanpdoyle/events{/privacy}","received_events_url":"https://api.github.com/users/seanpdoyle/received_events","type":"User","site_admin":false},"body":"Since this method collides with what would be `attr_reader :page`, what do you think about doing this in the constructor, then using an `attr_reader`:\r\n\r\n```rb\r\nclass FormFinder\r\n  def initialize(page)\r\n    @page = Nokogiri::HTML(page)\r\n  end\r\n\r\n  private\r\n\r\n  attr_reader :page\r\nend\r\n```","created_at":"2016-05-17T15:07:34Z","updated_at":"2016-05-17T15:07:34Z","html_url":"https://github.com/thoughtbot/form-linter/pull/1#discussion_r63539963","pull_request_url":"https://api.github.com/repos/thoughtbot/form-linter/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/form-linter/pulls/comments/63539963"},"html":{"href":"https://github.com/thoughtbot/form-linter/pull/1#discussion_r63539963"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/form-linter/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/form-linter/pulls/1","id":70372778,"html_url":"https://github.com/thoughtbot/form-linter/pull/1","diff_url":"https://github.com/thoughtbot/form-linter/pull/1.diff","patch_url":"https://github.com/thoughtbot/form-linter/pull/1.patch","issue_url":"https://api.github.com/repos/thoughtbot/form-linter/issues/1","number":1,"state":"open","locked":false,"title":"Find the form in the returned markup","user":{"login":"r00k","id":46677,"avatar_url":"https://avatars.githubusercontent.com/u/46677?v=3","gravatar_id":"","url":"https://api.github.com/users/r00k","html_url":"https://github.com/r00k","followers_url":"https://api.github.com/users/r00k/followers","following_url":"https://api.github.com/users/r00k/following{/other_user}","gists_url":"https://api.github.com/users/r00k/gists{/gist_id}","starred_url":"https://api.github.com/users/r00k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r00k/subscriptions","organizations_url":"https://api.github.com/users/r00k/orgs","repos_url":"https://api.github.com/users/r00k/repos","events_url":"https://api.github.com/users/r00k/events{/privacy}","received_events_url":"https://api.github.com/users/r00k/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-05-17T15:00:13Z","updated_at":"2016-05-17T15:07:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"491f1a93a9e92d6292b9828b55b8d5002327fd42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/form-linter/pulls/1/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/form-linter/pulls/1/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/form-linter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/form-linter/issues/1/comments","statuses_url":"https://api.github.com/repos/thoughtbot/form-linter/statuses/720ba7fdde8b6590584d4dac74aa485e1b811dea","head":{"label":"thoughtbot:bo-ae-form-only","ref":"bo-ae-form-only","sha":"720ba7fdde8b6590584d4dac74aa485e1b811dea","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":58745788,"name":"form-linter","full_name":"thoughtbot/form-linter","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/form-linter","description":"A linter to detect common issues in HTML forms","fork":false,"url":"https://api.github.com/repos/thoughtbot/form-linter","forks_url":"https://api.github.com/repos/thoughtbot/form-linter/forks","keys_url":"https://api.github.com/repos/thoughtbot/form-linter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/form-linter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/form-linter/teams","hooks_url":"https://api.github.com/repos/thoughtbot/form-linter/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/form-linter/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/form-linter/events","assignees_url":"https://api.github.com/repos/thoughtbot/form-linter/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/form-linter/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/form-linter/tags","blobs_url":"https://api.github.com/repos/thoughtbot/form-linter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/form-linter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/form-linter/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/form-linter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/form-linter/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/form-linter/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/form-linter/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/form-linter/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/form-linter/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/form-linter/subscription","commits_url":"https://api.github.com/repos/thoughtbot/form-linter/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/form-linter/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/form-linter/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/form-linter/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/form-linter/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/form-linter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/form-linter/merges","archive_url":"https://api.github.com/repos/thoughtbot/form-linter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/form-linter/downloads","issues_url":"https://api.github.com/repos/thoughtbot/form-linter/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/form-linter/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/form-linter/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/form-linter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/form-linter/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/form-linter/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/form-linter/deployments","created_at":"2016-05-13T14:10:21Z","updated_at":"2016-05-14T06:44:20Z","pushed_at":"2016-05-17T15:00:13Z","git_url":"git://github.com/thoughtbot/form-linter.git","ssh_url":"git@github.com:thoughtbot/form-linter.git","clone_url":"https://github.com/thoughtbot/form-linter.git","svn_url":"https://github.com/thoughtbot/form-linter","homepage":"http://formlinter.com","size":41,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"ca2c661f39c6ecdeb72348e264a9c180e48f22e9","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":58745788,"name":"form-linter","full_name":"thoughtbot/form-linter","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/form-linter","description":"A linter to detect common issues in HTML forms","fork":false,"url":"https://api.github.com/repos/thoughtbot/form-linter","forks_url":"https://api.github.com/repos/thoughtbot/form-linter/forks","keys_url":"https://api.github.com/repos/thoughtbot/form-linter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/form-linter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/form-linter/teams","hooks_url":"https://api.github.com/repos/thoughtbot/form-linter/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/form-linter/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/form-linter/events","assignees_url":"https://api.github.com/repos/thoughtbot/form-linter/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/form-linter/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/form-linter/tags","blobs_url":"https://api.github.com/repos/thoughtbot/form-linter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/form-linter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/form-linter/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/form-linter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/form-linter/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/form-linter/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/form-linter/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/form-linter/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/form-linter/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/form-linter/subscription","commits_url":"https://api.github.com/repos/thoughtbot/form-linter/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/form-linter/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/form-linter/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/form-linter/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/form-linter/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/form-linter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/form-linter/merges","archive_url":"https://api.github.com/repos/thoughtbot/form-linter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/form-linter/downloads","issues_url":"https://api.github.com/repos/thoughtbot/form-linter/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/form-linter/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/form-linter/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/form-linter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/form-linter/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/form-linter/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/form-linter/deployments","created_at":"2016-05-13T14:10:21Z","updated_at":"2016-05-14T06:44:20Z","pushed_at":"2016-05-17T15:00:13Z","git_url":"git://github.com/thoughtbot/form-linter.git","ssh_url":"git@github.com:thoughtbot/form-linter.git","clone_url":"https://github.com/thoughtbot/form-linter.git","svn_url":"https://github.com/thoughtbot/form-linter","homepage":"http://formlinter.com","size":41,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/form-linter/pulls/1"},"html":{"href":"https://github.com/thoughtbot/form-linter/pull/1"},"issue":{"href":"https://api.github.com/repos/thoughtbot/form-linter/issues/1"},"comments":{"href":"https://api.github.com/repos/thoughtbot/form-linter/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/form-linter/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/form-linter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/form-linter/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/form-linter/statuses/720ba7fdde8b6590584d4dac74aa485e1b811dea"}}}}