{"action":"created","comment":{"url":"https://api.github.com/repos/rom-rb/rom/pulls/comments/38706114","id":38706114,"diff_hunk":"@@ -24,6 +24,20 @@ def to_ary\n       end\n       alias_method :to_a, :to_ary\n \n+      # Return true if command successful\n+      #\n+      # @api public\n+      def success?\n+        !value.nil? && error.nil?\n+      end\n+\n+      # Return true if command failed\n+      #\n+      # @api public\n+      def failure?\n+        value.nil? && !error.nil?","path":"lib/rom/commands/result.rb","position":15,"original_position":15,"commit_id":"aadcf9ed520741fdfac4bb281251bf13031c2db1","original_commit_id":"aadcf9ed520741fdfac4bb281251bf13031c2db1","user":{"login":"adz","id":41101,"avatar_url":"https://avatars.githubusercontent.com/u/41101?v=3","gravatar_id":"","url":"https://api.github.com/users/adz","html_url":"https://github.com/adz","followers_url":"https://api.github.com/users/adz/followers","following_url":"https://api.github.com/users/adz/following{/other_user}","gists_url":"https://api.github.com/users/adz/gists{/gist_id}","starred_url":"https://api.github.com/users/adz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adz/subscriptions","organizations_url":"https://api.github.com/users/adz/orgs","repos_url":"https://api.github.com/users/adz/repos","events_url":"https://api.github.com/users/adz/events{/privacy}","received_events_url":"https://api.github.com/users/adz/received_events","type":"User","site_admin":false},"body":"Good answer ;)","created_at":"2015-09-03T22:54:39Z","updated_at":"2015-09-03T22:54:39Z","html_url":"https://github.com/rom-rb/rom/pull/310#discussion_r38706114","pull_request_url":"https://api.github.com/repos/rom-rb/rom/pulls/310","_links":{"self":{"href":"https://api.github.com/repos/rom-rb/rom/pulls/comments/38706114"},"html":{"href":"https://github.com/rom-rb/rom/pull/310#discussion_r38706114"},"pull_request":{"href":"https://api.github.com/repos/rom-rb/rom/pulls/310"}}},"pull_request":{"url":"https://api.github.com/repos/rom-rb/rom/pulls/310","id":43916973,"html_url":"https://github.com/rom-rb/rom/pull/310","diff_url":"https://github.com/rom-rb/rom/pull/310.diff","patch_url":"https://github.com/rom-rb/rom/pull/310.patch","issue_url":"https://api.github.com/repos/rom-rb/rom/issues/310","number":310,"state":"open","locked":false,"title":"Add success? and failure? to ROM::Commands::Result","user":{"login":"Snuff","id":2530710,"avatar_url":"https://avatars.githubusercontent.com/u/2530710?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuff","html_url":"https://github.com/Snuff","followers_url":"https://api.github.com/users/Snuff/followers","following_url":"https://api.github.com/users/Snuff/following{/other_user}","gists_url":"https://api.github.com/users/Snuff/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuff/subscriptions","organizations_url":"https://api.github.com/users/Snuff/orgs","repos_url":"https://api.github.com/users/Snuff/repos","events_url":"https://api.github.com/users/Snuff/events{/privacy}","received_events_url":"https://api.github.com/users/Snuff/received_events","type":"User","site_admin":false},"body":"Hello @solnic, I realized #266 issue, please review my code :pray: ","created_at":"2015-09-01T19:35:31Z","updated_at":"2015-09-03T22:54:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bada70666dfe7a285748d7d49d072a050e707f18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rom-rb/rom/pulls/310/commits","review_comments_url":"https://api.github.com/repos/rom-rb/rom/pulls/310/comments","review_comment_url":"https://api.github.com/repos/rom-rb/rom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rom-rb/rom/issues/310/comments","statuses_url":"https://api.github.com/repos/rom-rb/rom/statuses/aadcf9ed520741fdfac4bb281251bf13031c2db1","head":{"label":"Snuff:add-success-failure-to-commands-result","ref":"add-success-failure-to-commands-result","sha":"aadcf9ed520741fdfac4bb281251bf13031c2db1","user":{"login":"Snuff","id":2530710,"avatar_url":"https://avatars.githubusercontent.com/u/2530710?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuff","html_url":"https://github.com/Snuff","followers_url":"https://api.github.com/users/Snuff/followers","following_url":"https://api.github.com/users/Snuff/following{/other_user}","gists_url":"https://api.github.com/users/Snuff/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuff/subscriptions","organizations_url":"https://api.github.com/users/Snuff/orgs","repos_url":"https://api.github.com/users/Snuff/repos","events_url":"https://api.github.com/users/Snuff/events{/privacy}","received_events_url":"https://api.github.com/users/Snuff/received_events","type":"User","site_admin":false},"repo":{"id":41740582,"name":"rom","full_name":"Snuff/rom","owner":{"login":"Snuff","id":2530710,"avatar_url":"https://avatars.githubusercontent.com/u/2530710?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuff","html_url":"https://github.com/Snuff","followers_url":"https://api.github.com/users/Snuff/followers","following_url":"https://api.github.com/users/Snuff/following{/other_user}","gists_url":"https://api.github.com/users/Snuff/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuff/subscriptions","organizations_url":"https://api.github.com/users/Snuff/orgs","repos_url":"https://api.github.com/users/Snuff/repos","events_url":"https://api.github.com/users/Snuff/events{/privacy}","received_events_url":"https://api.github.com/users/Snuff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Snuff/rom","description":"Data mapping and persistence toolkit for Ruby","fork":true,"url":"https://api.github.com/repos/Snuff/rom","forks_url":"https://api.github.com/repos/Snuff/rom/forks","keys_url":"https://api.github.com/repos/Snuff/rom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Snuff/rom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Snuff/rom/teams","hooks_url":"https://api.github.com/repos/Snuff/rom/hooks","issue_events_url":"https://api.github.com/repos/Snuff/rom/issues/events{/number}","events_url":"https://api.github.com/repos/Snuff/rom/events","assignees_url":"https://api.github.com/repos/Snuff/rom/assignees{/user}","branches_url":"https://api.github.com/repos/Snuff/rom/branches{/branch}","tags_url":"https://api.github.com/repos/Snuff/rom/tags","blobs_url":"https://api.github.com/repos/Snuff/rom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Snuff/rom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Snuff/rom/git/refs{/sha}","trees_url":"https://api.github.com/repos/Snuff/rom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Snuff/rom/statuses/{sha}","languages_url":"https://api.github.com/repos/Snuff/rom/languages","stargazers_url":"https://api.github.com/repos/Snuff/rom/stargazers","contributors_url":"https://api.github.com/repos/Snuff/rom/contributors","subscribers_url":"https://api.github.com/repos/Snuff/rom/subscribers","subscription_url":"https://api.github.com/repos/Snuff/rom/subscription","commits_url":"https://api.github.com/repos/Snuff/rom/commits{/sha}","git_commits_url":"https://api.github.com/repos/Snuff/rom/git/commits{/sha}","comments_url":"https://api.github.com/repos/Snuff/rom/comments{/number}","issue_comment_url":"https://api.github.com/repos/Snuff/rom/issues/comments{/number}","contents_url":"https://api.github.com/repos/Snuff/rom/contents/{+path}","compare_url":"https://api.github.com/repos/Snuff/rom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Snuff/rom/merges","archive_url":"https://api.github.com/repos/Snuff/rom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Snuff/rom/downloads","issues_url":"https://api.github.com/repos/Snuff/rom/issues{/number}","pulls_url":"https://api.github.com/repos/Snuff/rom/pulls{/number}","milestones_url":"https://api.github.com/repos/Snuff/rom/milestones{/number}","notifications_url":"https://api.github.com/repos/Snuff/rom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Snuff/rom/labels{/name}","releases_url":"https://api.github.com/repos/Snuff/rom/releases{/id}","created_at":"2015-09-01T13:34:40Z","updated_at":"2015-09-01T13:34:40Z","pushed_at":"2015-09-01T19:34:48Z","git_url":"git://github.com/Snuff/rom.git","ssh_url":"git@github.com:Snuff/rom.git","clone_url":"https://github.com/Snuff/rom.git","svn_url":"https://github.com/Snuff/rom","homepage":"http://rom-rb.org","size":4293,"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":"rom-rb:master","ref":"master","sha":"fe015af26e815fb1e89b41aac202c497edfc0b67","user":{"login":"rom-rb","id":4589832,"avatar_url":"https://avatars.githubusercontent.com/u/4589832?v=3","gravatar_id":"","url":"https://api.github.com/users/rom-rb","html_url":"https://github.com/rom-rb","followers_url":"https://api.github.com/users/rom-rb/followers","following_url":"https://api.github.com/users/rom-rb/following{/other_user}","gists_url":"https://api.github.com/users/rom-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/rom-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rom-rb/subscriptions","organizations_url":"https://api.github.com/users/rom-rb/orgs","repos_url":"https://api.github.com/users/rom-rb/repos","events_url":"https://api.github.com/users/rom-rb/events{/privacy}","received_events_url":"https://api.github.com/users/rom-rb/received_events","type":"Organization","site_admin":false},"repo":{"id":10707658,"name":"rom","full_name":"rom-rb/rom","owner":{"login":"rom-rb","id":4589832,"avatar_url":"https://avatars.githubusercontent.com/u/4589832?v=3","gravatar_id":"","url":"https://api.github.com/users/rom-rb","html_url":"https://github.com/rom-rb","followers_url":"https://api.github.com/users/rom-rb/followers","following_url":"https://api.github.com/users/rom-rb/following{/other_user}","gists_url":"https://api.github.com/users/rom-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/rom-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rom-rb/subscriptions","organizations_url":"https://api.github.com/users/rom-rb/orgs","repos_url":"https://api.github.com/users/rom-rb/repos","events_url":"https://api.github.com/users/rom-rb/events{/privacy}","received_events_url":"https://api.github.com/users/rom-rb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rom-rb/rom","description":"Data mapping and persistence toolkit for Ruby","fork":false,"url":"https://api.github.com/repos/rom-rb/rom","forks_url":"https://api.github.com/repos/rom-rb/rom/forks","keys_url":"https://api.github.com/repos/rom-rb/rom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rom-rb/rom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rom-rb/rom/teams","hooks_url":"https://api.github.com/repos/rom-rb/rom/hooks","issue_events_url":"https://api.github.com/repos/rom-rb/rom/issues/events{/number}","events_url":"https://api.github.com/repos/rom-rb/rom/events","assignees_url":"https://api.github.com/repos/rom-rb/rom/assignees{/user}","branches_url":"https://api.github.com/repos/rom-rb/rom/branches{/branch}","tags_url":"https://api.github.com/repos/rom-rb/rom/tags","blobs_url":"https://api.github.com/repos/rom-rb/rom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rom-rb/rom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rom-rb/rom/git/refs{/sha}","trees_url":"https://api.github.com/repos/rom-rb/rom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rom-rb/rom/statuses/{sha}","languages_url":"https://api.github.com/repos/rom-rb/rom/languages","stargazers_url":"https://api.github.com/repos/rom-rb/rom/stargazers","contributors_url":"https://api.github.com/repos/rom-rb/rom/contributors","subscribers_url":"https://api.github.com/repos/rom-rb/rom/subscribers","subscription_url":"https://api.github.com/repos/rom-rb/rom/subscription","commits_url":"https://api.github.com/repos/rom-rb/rom/commits{/sha}","git_commits_url":"https://api.github.com/repos/rom-rb/rom/git/commits{/sha}","comments_url":"https://api.github.com/repos/rom-rb/rom/comments{/number}","issue_comment_url":"https://api.github.com/repos/rom-rb/rom/issues/comments{/number}","contents_url":"https://api.github.com/repos/rom-rb/rom/contents/{+path}","compare_url":"https://api.github.com/repos/rom-rb/rom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rom-rb/rom/merges","archive_url":"https://api.github.com/repos/rom-rb/rom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rom-rb/rom/downloads","issues_url":"https://api.github.com/repos/rom-rb/rom/issues{/number}","pulls_url":"https://api.github.com/repos/rom-rb/rom/pulls{/number}","milestones_url":"https://api.github.com/repos/rom-rb/rom/milestones{/number}","notifications_url":"https://api.github.com/repos/rom-rb/rom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rom-rb/rom/labels{/name}","releases_url":"https://api.github.com/repos/rom-rb/rom/releases{/id}","created_at":"2013-06-15T14:59:58Z","updated_at":"2015-09-03T11:01:54Z","pushed_at":"2015-09-01T19:35:31Z","git_url":"git://github.com/rom-rb/rom.git","ssh_url":"git@github.com:rom-rb/rom.git","clone_url":"https://github.com/rom-rb/rom.git","svn_url":"https://github.com/rom-rb/rom","homepage":"http://rom-rb.org","size":8116,"stargazers_count":912,"watchers_count":912,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":16,"forks":67,"open_issues":16,"watchers":912,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rom-rb/rom/pulls/310"},"html":{"href":"https://github.com/rom-rb/rom/pull/310"},"issue":{"href":"https://api.github.com/repos/rom-rb/rom/issues/310"},"comments":{"href":"https://api.github.com/repos/rom-rb/rom/issues/310/comments"},"review_comments":{"href":"https://api.github.com/repos/rom-rb/rom/pulls/310/comments"},"review_comment":{"href":"https://api.github.com/repos/rom-rb/rom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rom-rb/rom/pulls/310/commits"},"statuses":{"href":"https://api.github.com/repos/rom-rb/rom/statuses/aadcf9ed520741fdfac4bb281251bf13031c2db1"}}}}