{"action":"created","comment":{"url":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/comments/32912705","id":32912705,"diff_hunk":"@@ -0,0 +1,74 @@\n+class Array\n+\n+  attr_accessor :index, :result\n+\n+  def new_inject(startvalue = 'empty', arg2 = nil, &block)\n+    if block_given?\n+      self.new_inject_block(startvalue, &block)\n+    elsif startvalue.is_a?(Symbol)\n+      self.new_inject_sym_wo_argument(startvalue)\n+    else\n+      self.new_inject_sym(startvalue,arg2)\n+    end\n+  end\n+\n+  def new_inject_sym_wo_argument(symbol)\n+    set_result(symbol)\n+    while index < self.length\n+      element = self[index]\n+      self.result = result.send symbol, element\n+      self.index += 1\n+    end\n+    result\n+  end\n+\n+  def new_inject_sym(startvalue, symbol)\n+    set_result(startvalue)\n+    while index < self.length\n+      element = self[index]\n+      self.result = result.send symbol, element\n+      self.index += 1\n+    end\n+    result\n+  end\n+\n+  def new_inject_block(startvalue = 'empty', &block)\n+    set_result(startvalue)\n+    while index < self.length\n+      element = self[index]\n+      self.result = block.call(result, element)\n+      self.index +=1\n+    end\n+    result\n+  end\n+\n+  def set_result(startvalue)\n+    startvalue.is_a?(Fixnum) ? self.index = 0 : self.index = 1\n+    self.result = self[0] if startvalue.is_a?(Symbol)\n+    self.result = startvalue if startvalue.is_a?(Fixnum)\n+    self.result = self[0] if self[0].is_a?(Fixnum) && startvalue.is_a?(String)\n+    self.result = self[0] if self[0].is_a?(String)\n+  end\n+\n+\n+\n+\n+","path":"lib/inject.rb","position":56,"original_position":56,"commit_id":"f478e68168aba96436b539cf664d8527e1db2285","original_commit_id":"f478e68168aba96436b539cf664d8527e1db2285","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Extra blank line detected.","created_at":"2015-06-22T08:15:25Z","updated_at":"2015-06-22T08:15:25Z","html_url":"https://github.com/makersacademy/inject-challenge/pull/80#discussion_r32912705","pull_request_url":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/80","_links":{"self":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/comments/32912705"},"html":{"href":"https://github.com/makersacademy/inject-challenge/pull/80#discussion_r32912705"},"pull_request":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/80","id":38208479,"html_url":"https://github.com/makersacademy/inject-challenge/pull/80","diff_url":"https://github.com/makersacademy/inject-challenge/pull/80.diff","patch_url":"https://github.com/makersacademy/inject-challenge/pull/80.patch","issue_url":"https://api.github.com/repos/makersacademy/inject-challenge/issues/80","number":80,"state":"open","locked":false,"title":"Inject challenge","user":{"login":"salman-karim","id":12249905,"avatar_url":"https://avatars.githubusercontent.com/u/12249905?v=3","gravatar_id":"","url":"https://api.github.com/users/salman-karim","html_url":"https://github.com/salman-karim","followers_url":"https://api.github.com/users/salman-karim/followers","following_url":"https://api.github.com/users/salman-karim/following{/other_user}","gists_url":"https://api.github.com/users/salman-karim/gists{/gist_id}","starred_url":"https://api.github.com/users/salman-karim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salman-karim/subscriptions","organizations_url":"https://api.github.com/users/salman-karim/orgs","repos_url":"https://api.github.com/users/salman-karim/repos","events_url":"https://api.github.com/users/salman-karim/events{/privacy}","received_events_url":"https://api.github.com/users/salman-karim/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-22T08:15:18Z","updated_at":"2015-06-22T08:15:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"febdbc98ecc82846bd18e37b4e955e8dbbdb8ce9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/80/commits","review_comments_url":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/80/comments","review_comment_url":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/makersacademy/inject-challenge/issues/80/comments","statuses_url":"https://api.github.com/repos/makersacademy/inject-challenge/statuses/f478e68168aba96436b539cf664d8527e1db2285","head":{"label":"salman-karim:master","ref":"master","sha":"f478e68168aba96436b539cf664d8527e1db2285","user":{"login":"salman-karim","id":12249905,"avatar_url":"https://avatars.githubusercontent.com/u/12249905?v=3","gravatar_id":"","url":"https://api.github.com/users/salman-karim","html_url":"https://github.com/salman-karim","followers_url":"https://api.github.com/users/salman-karim/followers","following_url":"https://api.github.com/users/salman-karim/following{/other_user}","gists_url":"https://api.github.com/users/salman-karim/gists{/gist_id}","starred_url":"https://api.github.com/users/salman-karim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salman-karim/subscriptions","organizations_url":"https://api.github.com/users/salman-karim/orgs","repos_url":"https://api.github.com/users/salman-karim/repos","events_url":"https://api.github.com/users/salman-karim/events{/privacy}","received_events_url":"https://api.github.com/users/salman-karim/received_events","type":"User","site_admin":false},"repo":{"id":37714475,"name":"inject-challenge","full_name":"salman-karim/inject-challenge","owner":{"login":"salman-karim","id":12249905,"avatar_url":"https://avatars.githubusercontent.com/u/12249905?v=3","gravatar_id":"","url":"https://api.github.com/users/salman-karim","html_url":"https://github.com/salman-karim","followers_url":"https://api.github.com/users/salman-karim/followers","following_url":"https://api.github.com/users/salman-karim/following{/other_user}","gists_url":"https://api.github.com/users/salman-karim/gists{/gist_id}","starred_url":"https://api.github.com/users/salman-karim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salman-karim/subscriptions","organizations_url":"https://api.github.com/users/salman-karim/orgs","repos_url":"https://api.github.com/users/salman-karim/repos","events_url":"https://api.github.com/users/salman-karim/events{/privacy}","received_events_url":"https://api.github.com/users/salman-karim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/salman-karim/inject-challenge","description":"Rewrite the Ruby Inject Method","fork":true,"url":"https://api.github.com/repos/salman-karim/inject-challenge","forks_url":"https://api.github.com/repos/salman-karim/inject-challenge/forks","keys_url":"https://api.github.com/repos/salman-karim/inject-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salman-karim/inject-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salman-karim/inject-challenge/teams","hooks_url":"https://api.github.com/repos/salman-karim/inject-challenge/hooks","issue_events_url":"https://api.github.com/repos/salman-karim/inject-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/salman-karim/inject-challenge/events","assignees_url":"https://api.github.com/repos/salman-karim/inject-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/salman-karim/inject-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/salman-karim/inject-challenge/tags","blobs_url":"https://api.github.com/repos/salman-karim/inject-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salman-karim/inject-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salman-karim/inject-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/salman-karim/inject-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salman-karim/inject-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/salman-karim/inject-challenge/languages","stargazers_url":"https://api.github.com/repos/salman-karim/inject-challenge/stargazers","contributors_url":"https://api.github.com/repos/salman-karim/inject-challenge/contributors","subscribers_url":"https://api.github.com/repos/salman-karim/inject-challenge/subscribers","subscription_url":"https://api.github.com/repos/salman-karim/inject-challenge/subscription","commits_url":"https://api.github.com/repos/salman-karim/inject-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/salman-karim/inject-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/salman-karim/inject-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/salman-karim/inject-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/salman-karim/inject-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/salman-karim/inject-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salman-karim/inject-challenge/merges","archive_url":"https://api.github.com/repos/salman-karim/inject-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salman-karim/inject-challenge/downloads","issues_url":"https://api.github.com/repos/salman-karim/inject-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/salman-karim/inject-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/salman-karim/inject-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/salman-karim/inject-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salman-karim/inject-challenge/labels{/name}","releases_url":"https://api.github.com/repos/salman-karim/inject-challenge/releases{/id}","created_at":"2015-06-19T09:49:12Z","updated_at":"2015-06-19T09:49:12Z","pushed_at":"2015-06-22T07:27:31Z","git_url":"git://github.com/salman-karim/inject-challenge.git","ssh_url":"git@github.com:salman-karim/inject-challenge.git","clone_url":"https://github.com/salman-karim/inject-challenge.git","svn_url":"https://github.com/salman-karim/inject-challenge","homepage":null,"size":1019,"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":"makersacademy:master","ref":"master","sha":"ff5f90c3804eea73c85b1632e289395f46fe75da","user":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"repo":{"id":27006120,"name":"inject-challenge","full_name":"makersacademy/inject-challenge","owner":{"login":"makersacademy","id":3636186,"avatar_url":"https://avatars.githubusercontent.com/u/3636186?v=3","gravatar_id":"","url":"https://api.github.com/users/makersacademy","html_url":"https://github.com/makersacademy","followers_url":"https://api.github.com/users/makersacademy/followers","following_url":"https://api.github.com/users/makersacademy/following{/other_user}","gists_url":"https://api.github.com/users/makersacademy/gists{/gist_id}","starred_url":"https://api.github.com/users/makersacademy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makersacademy/subscriptions","organizations_url":"https://api.github.com/users/makersacademy/orgs","repos_url":"https://api.github.com/users/makersacademy/repos","events_url":"https://api.github.com/users/makersacademy/events{/privacy}","received_events_url":"https://api.github.com/users/makersacademy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/makersacademy/inject-challenge","description":"Rewrite the Ruby Inject Method","fork":false,"url":"https://api.github.com/repos/makersacademy/inject-challenge","forks_url":"https://api.github.com/repos/makersacademy/inject-challenge/forks","keys_url":"https://api.github.com/repos/makersacademy/inject-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makersacademy/inject-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makersacademy/inject-challenge/teams","hooks_url":"https://api.github.com/repos/makersacademy/inject-challenge/hooks","issue_events_url":"https://api.github.com/repos/makersacademy/inject-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/makersacademy/inject-challenge/events","assignees_url":"https://api.github.com/repos/makersacademy/inject-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/makersacademy/inject-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/makersacademy/inject-challenge/tags","blobs_url":"https://api.github.com/repos/makersacademy/inject-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makersacademy/inject-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makersacademy/inject-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/makersacademy/inject-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makersacademy/inject-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/makersacademy/inject-challenge/languages","stargazers_url":"https://api.github.com/repos/makersacademy/inject-challenge/stargazers","contributors_url":"https://api.github.com/repos/makersacademy/inject-challenge/contributors","subscribers_url":"https://api.github.com/repos/makersacademy/inject-challenge/subscribers","subscription_url":"https://api.github.com/repos/makersacademy/inject-challenge/subscription","commits_url":"https://api.github.com/repos/makersacademy/inject-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/makersacademy/inject-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/makersacademy/inject-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/makersacademy/inject-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/makersacademy/inject-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/makersacademy/inject-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makersacademy/inject-challenge/merges","archive_url":"https://api.github.com/repos/makersacademy/inject-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makersacademy/inject-challenge/downloads","issues_url":"https://api.github.com/repos/makersacademy/inject-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/makersacademy/inject-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/makersacademy/inject-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/makersacademy/inject-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makersacademy/inject-challenge/labels{/name}","releases_url":"https://api.github.com/repos/makersacademy/inject-challenge/releases{/id}","created_at":"2014-11-22T17:17:20Z","updated_at":"2015-05-08T07:56:50Z","pushed_at":"2015-06-22T08:15:18Z","git_url":"git://github.com/makersacademy/inject-challenge.git","ssh_url":"git@github.com:makersacademy/inject-challenge.git","clone_url":"https://github.com/makersacademy/inject-challenge.git","svn_url":"https://github.com/makersacademy/inject-challenge","homepage":null,"size":1019,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"open_issues_count":21,"forks":73,"open_issues":21,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/80"},"html":{"href":"https://github.com/makersacademy/inject-challenge/pull/80"},"issue":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/issues/80"},"comments":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/makersacademy/inject-challenge/statuses/f478e68168aba96436b539cf664d8527e1db2285"}}}}