{"action":"created","comment":{"url":"https://api.github.com/repos/D3MNetworks/ronad/pulls/comments/235787431","pull_request_review_id":177735538,"id":235787431,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTc4NzQzMQ==","diff_hunk":"@@ -0,0 +1,7 @@\n+module Ronad\n+  class JustOne < Just\n+    def initialize(*args)\n+      super args.detect { |v| Monad === v ? v.value : v }","path":"lib/ronad/just_one.rb","position":4,"original_position":4,"commit_id":"eab91774d5814fc276af3f0ef4479b2d18cbbf07","original_commit_id":"eab91774d5814fc276af3f0ef4479b2d18cbbf07","user":{"login":"uri","id":676443,"node_id":"MDQ6VXNlcjY3NjQ0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/676443?v=4","gravatar_id":"","url":"https://api.github.com/users/uri","html_url":"https://github.com/uri","followers_url":"https://api.github.com/users/uri/followers","following_url":"https://api.github.com/users/uri/following{/other_user}","gists_url":"https://api.github.com/users/uri/gists{/gist_id}","starred_url":"https://api.github.com/users/uri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uri/subscriptions","organizations_url":"https://api.github.com/users/uri/orgs","repos_url":"https://api.github.com/users/uri/repos","events_url":"https://api.github.com/users/uri/events{/privacy}","received_events_url":"https://api.github.com/users/uri/received_events","type":"User","site_admin":false},"body":"Ronad::JustOne#initialize has the variable name 'v'\n\n[Read more about it here.](https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Variable-Name.md)","created_at":"2018-11-22T16:59:13Z","updated_at":"2018-11-22T16:59:14Z","html_url":"https://github.com/D3MNetworks/ronad/pull/14#discussion_r235787431","pull_request_url":"https://api.github.com/repos/D3MNetworks/ronad/pulls/14","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/D3MNetworks/ronad/pulls/comments/235787431"},"html":{"href":"https://github.com/D3MNetworks/ronad/pull/14#discussion_r235787431"},"pull_request":{"href":"https://api.github.com/repos/D3MNetworks/ronad/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/D3MNetworks/ronad/pulls/14","id":233039470,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMDM5NDcw","html_url":"https://github.com/D3MNetworks/ronad/pull/14","diff_url":"https://github.com/D3MNetworks/ronad/pull/14.diff","patch_url":"https://github.com/D3MNetworks/ronad/pull/14.patch","issue_url":"https://api.github.com/repos/D3MNetworks/ronad/issues/14","number":14,"state":"closed","locked":false,"title":"JustOne","user":{"login":"uri","id":676443,"node_id":"MDQ6VXNlcjY3NjQ0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/676443?v=4","gravatar_id":"","url":"https://api.github.com/users/uri","html_url":"https://github.com/uri","followers_url":"https://api.github.com/users/uri/followers","following_url":"https://api.github.com/users/uri/following{/other_user}","gists_url":"https://api.github.com/users/uri/gists{/gist_id}","starred_url":"https://api.github.com/users/uri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uri/subscriptions","organizations_url":"https://api.github.com/users/uri/orgs","repos_url":"https://api.github.com/users/uri/repos","events_url":"https://api.github.com/users/uri/events{/privacy}","received_events_url":"https://api.github.com/users/uri/received_events","type":"User","site_admin":false},"body":"Created a new monad that take multiple values and return the first\r\nnon-nil value.\r\n\r\nEssentially the same as chaining with `||` however since `||` is a\r\nmethod, chaining this with Maybe will short the express to always be\r\nnil:\r\n\r\n    (Maybe(nil) || Maybe(2)).value #=> nil\r\n\r\nThis can be circumvented by getting the value first:\r\n\r\n    ~Maybe(nil) || ~Maybe(2)\r\n\r\nHowever if you want to apply a common interface to a monad and just\r\ninteract with the one that is not nil a JustOne can be used:\r\n\r\n    jo = JustOne(\r\n      Maybe(params[:update_params])[:plan],\r\n      Maybe(params[:params])[:plan],\r\n      Maybe(params[:plan])\r\n    )\r\n\r\nThis case documents that one of these three cases will have a value\r\n(otherwise it will throw an error). Continuing from the previous\r\nexample, the monad can be used before evaluating the value:\r\n\r\n    is_single = jo =~ /^single_/\r\n\r\n    if ~is_single\r\n      #...\r\n    end","created_at":"2018-11-22T16:58:29Z","updated_at":"2018-11-22T16:59:13Z","closed_at":"2018-11-22T16:58:45Z","merged_at":"2018-11-22T16:58:45Z","merge_commit_sha":"434211870eafe4ec2833b7e8d23fa7b44316d3ef","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/D3MNetworks/ronad/pulls/14/commits","review_comments_url":"https://api.github.com/repos/D3MNetworks/ronad/pulls/14/comments","review_comment_url":"https://api.github.com/repos/D3MNetworks/ronad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D3MNetworks/ronad/issues/14/comments","statuses_url":"https://api.github.com/repos/D3MNetworks/ronad/statuses/eab91774d5814fc276af3f0ef4479b2d18cbbf07","head":{"label":"uri:just-one","ref":"just-one","sha":"eab91774d5814fc276af3f0ef4479b2d18cbbf07","user":{"login":"uri","id":676443,"node_id":"MDQ6VXNlcjY3NjQ0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/676443?v=4","gravatar_id":"","url":"https://api.github.com/users/uri","html_url":"https://github.com/uri","followers_url":"https://api.github.com/users/uri/followers","following_url":"https://api.github.com/users/uri/following{/other_user}","gists_url":"https://api.github.com/users/uri/gists{/gist_id}","starred_url":"https://api.github.com/users/uri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uri/subscriptions","organizations_url":"https://api.github.com/users/uri/orgs","repos_url":"https://api.github.com/users/uri/repos","events_url":"https://api.github.com/users/uri/events{/privacy}","received_events_url":"https://api.github.com/users/uri/received_events","type":"User","site_admin":false},"repo":{"id":116315640,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYzMTU2NDA=","name":"ronad","full_name":"uri/ronad","private":false,"owner":{"login":"uri","id":676443,"node_id":"MDQ6VXNlcjY3NjQ0Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/676443?v=4","gravatar_id":"","url":"https://api.github.com/users/uri","html_url":"https://github.com/uri","followers_url":"https://api.github.com/users/uri/followers","following_url":"https://api.github.com/users/uri/following{/other_user}","gists_url":"https://api.github.com/users/uri/gists{/gist_id}","starred_url":"https://api.github.com/users/uri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uri/subscriptions","organizations_url":"https://api.github.com/users/uri/orgs","repos_url":"https://api.github.com/users/uri/repos","events_url":"https://api.github.com/users/uri/events{/privacy}","received_events_url":"https://api.github.com/users/uri/received_events","type":"User","site_admin":false},"html_url":"https://github.com/uri/ronad","description":"Monads done the Ruby way","fork":true,"url":"https://api.github.com/repos/uri/ronad","forks_url":"https://api.github.com/repos/uri/ronad/forks","keys_url":"https://api.github.com/repos/uri/ronad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uri/ronad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uri/ronad/teams","hooks_url":"https://api.github.com/repos/uri/ronad/hooks","issue_events_url":"https://api.github.com/repos/uri/ronad/issues/events{/number}","events_url":"https://api.github.com/repos/uri/ronad/events","assignees_url":"https://api.github.com/repos/uri/ronad/assignees{/user}","branches_url":"https://api.github.com/repos/uri/ronad/branches{/branch}","tags_url":"https://api.github.com/repos/uri/ronad/tags","blobs_url":"https://api.github.com/repos/uri/ronad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uri/ronad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uri/ronad/git/refs{/sha}","trees_url":"https://api.github.com/repos/uri/ronad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uri/ronad/statuses/{sha}","languages_url":"https://api.github.com/repos/uri/ronad/languages","stargazers_url":"https://api.github.com/repos/uri/ronad/stargazers","contributors_url":"https://api.github.com/repos/uri/ronad/contributors","subscribers_url":"https://api.github.com/repos/uri/ronad/subscribers","subscription_url":"https://api.github.com/repos/uri/ronad/subscription","commits_url":"https://api.github.com/repos/uri/ronad/commits{/sha}","git_commits_url":"https://api.github.com/repos/uri/ronad/git/commits{/sha}","comments_url":"https://api.github.com/repos/uri/ronad/comments{/number}","issue_comment_url":"https://api.github.com/repos/uri/ronad/issues/comments{/number}","contents_url":"https://api.github.com/repos/uri/ronad/contents/{+path}","compare_url":"https://api.github.com/repos/uri/ronad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uri/ronad/merges","archive_url":"https://api.github.com/repos/uri/ronad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uri/ronad/downloads","issues_url":"https://api.github.com/repos/uri/ronad/issues{/number}","pulls_url":"https://api.github.com/repos/uri/ronad/pulls{/number}","milestones_url":"https://api.github.com/repos/uri/ronad/milestones{/number}","notifications_url":"https://api.github.com/repos/uri/ronad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uri/ronad/labels{/name}","releases_url":"https://api.github.com/repos/uri/ronad/releases{/id}","deployments_url":"https://api.github.com/repos/uri/ronad/deployments","created_at":"2018-01-04T22:55:44Z","updated_at":"2018-04-18T01:25:42Z","pushed_at":"2018-11-22T16:58:48Z","git_url":"git://github.com/uri/ronad.git","ssh_url":"git@github.com:uri/ronad.git","clone_url":"https://github.com/uri/ronad.git","svn_url":"https://github.com/uri/ronad","homepage":null,"size":49,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"D3MNetworks:master","ref":"master","sha":"1371f40c4cf6e1a6e4f9cd511f91599520fd50c2","user":{"login":"D3MNetworks","id":32692969,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjkyOTY5","avatar_url":"https://avatars3.githubusercontent.com/u/32692969?v=4","gravatar_id":"","url":"https://api.github.com/users/D3MNetworks","html_url":"https://github.com/D3MNetworks","followers_url":"https://api.github.com/users/D3MNetworks/followers","following_url":"https://api.github.com/users/D3MNetworks/following{/other_user}","gists_url":"https://api.github.com/users/D3MNetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/D3MNetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D3MNetworks/subscriptions","organizations_url":"https://api.github.com/users/D3MNetworks/orgs","repos_url":"https://api.github.com/users/D3MNetworks/repos","events_url":"https://api.github.com/users/D3MNetworks/events{/privacy}","received_events_url":"https://api.github.com/users/D3MNetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":112755267,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI3NTUyNjc=","name":"ronad","full_name":"D3MNetworks/ronad","private":false,"owner":{"login":"D3MNetworks","id":32692969,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNjkyOTY5","avatar_url":"https://avatars3.githubusercontent.com/u/32692969?v=4","gravatar_id":"","url":"https://api.github.com/users/D3MNetworks","html_url":"https://github.com/D3MNetworks","followers_url":"https://api.github.com/users/D3MNetworks/followers","following_url":"https://api.github.com/users/D3MNetworks/following{/other_user}","gists_url":"https://api.github.com/users/D3MNetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/D3MNetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D3MNetworks/subscriptions","organizations_url":"https://api.github.com/users/D3MNetworks/orgs","repos_url":"https://api.github.com/users/D3MNetworks/repos","events_url":"https://api.github.com/users/D3MNetworks/events{/privacy}","received_events_url":"https://api.github.com/users/D3MNetworks/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/D3MNetworks/ronad","description":"Ruby monads","fork":false,"url":"https://api.github.com/repos/D3MNetworks/ronad","forks_url":"https://api.github.com/repos/D3MNetworks/ronad/forks","keys_url":"https://api.github.com/repos/D3MNetworks/ronad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D3MNetworks/ronad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D3MNetworks/ronad/teams","hooks_url":"https://api.github.com/repos/D3MNetworks/ronad/hooks","issue_events_url":"https://api.github.com/repos/D3MNetworks/ronad/issues/events{/number}","events_url":"https://api.github.com/repos/D3MNetworks/ronad/events","assignees_url":"https://api.github.com/repos/D3MNetworks/ronad/assignees{/user}","branches_url":"https://api.github.com/repos/D3MNetworks/ronad/branches{/branch}","tags_url":"https://api.github.com/repos/D3MNetworks/ronad/tags","blobs_url":"https://api.github.com/repos/D3MNetworks/ronad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D3MNetworks/ronad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D3MNetworks/ronad/git/refs{/sha}","trees_url":"https://api.github.com/repos/D3MNetworks/ronad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D3MNetworks/ronad/statuses/{sha}","languages_url":"https://api.github.com/repos/D3MNetworks/ronad/languages","stargazers_url":"https://api.github.com/repos/D3MNetworks/ronad/stargazers","contributors_url":"https://api.github.com/repos/D3MNetworks/ronad/contributors","subscribers_url":"https://api.github.com/repos/D3MNetworks/ronad/subscribers","subscription_url":"https://api.github.com/repos/D3MNetworks/ronad/subscription","commits_url":"https://api.github.com/repos/D3MNetworks/ronad/commits{/sha}","git_commits_url":"https://api.github.com/repos/D3MNetworks/ronad/git/commits{/sha}","comments_url":"https://api.github.com/repos/D3MNetworks/ronad/comments{/number}","issue_comment_url":"https://api.github.com/repos/D3MNetworks/ronad/issues/comments{/number}","contents_url":"https://api.github.com/repos/D3MNetworks/ronad/contents/{+path}","compare_url":"https://api.github.com/repos/D3MNetworks/ronad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D3MNetworks/ronad/merges","archive_url":"https://api.github.com/repos/D3MNetworks/ronad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D3MNetworks/ronad/downloads","issues_url":"https://api.github.com/repos/D3MNetworks/ronad/issues{/number}","pulls_url":"https://api.github.com/repos/D3MNetworks/ronad/pulls{/number}","milestones_url":"https://api.github.com/repos/D3MNetworks/ronad/milestones{/number}","notifications_url":"https://api.github.com/repos/D3MNetworks/ronad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D3MNetworks/ronad/labels{/name}","releases_url":"https://api.github.com/repos/D3MNetworks/ronad/releases{/id}","deployments_url":"https://api.github.com/repos/D3MNetworks/ronad/deployments","created_at":"2017-12-01T15:28:17Z","updated_at":"2018-11-22T16:58:47Z","pushed_at":"2018-11-22T16:58:45Z","git_url":"git://github.com/D3MNetworks/ronad.git","ssh_url":"git@github.com:D3MNetworks/ronad.git","clone_url":"https://github.com/D3MNetworks/ronad.git","svn_url":"https://github.com/D3MNetworks/ronad","homepage":"","size":48,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":0,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D3MNetworks/ronad/pulls/14"},"html":{"href":"https://github.com/D3MNetworks/ronad/pull/14"},"issue":{"href":"https://api.github.com/repos/D3MNetworks/ronad/issues/14"},"comments":{"href":"https://api.github.com/repos/D3MNetworks/ronad/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/D3MNetworks/ronad/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/D3MNetworks/ronad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D3MNetworks/ronad/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/D3MNetworks/ronad/statuses/eab91774d5814fc276af3f0ef4479b2d18cbbf07"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"uri"}}