{"action":"created","comment":{"url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/comments/33005878","id":33005878,"diff_hunk":"@@ -0,0 +1,150 @@\n+\n+def validate_menu(option_chosen)\n+\n+\tmenu_valid_range = [1,2,3] #todo: figure out why not accessible when defined as so outside/above this funct\n+\n+\t#if (/^[1,2,3]$/ !~ menu_option_chosen)\n+\tif !(menu_valid_range.include?(option_chosen.to_i)) #i don't see a constructive way to fit use of a .count towards this purpose\n+\t\tputs \"Invalid menu choice, try again\\n\\n\"\n+\t\treturn false\n+\telse\n+\t\treturn true\t\n+\tend\n+\n+end\n+\n+authorized_accounts = [\n+  \t\t{name: \"joe\", pin: 1234, balance: 9000},\n+  \t\t{name: \"ed\", pin: 5678, balance: 5000},\n+  \t\t{name: \"phil\", pin: 9012, balance: 1000}\n+  \t]\n+atm_avail_funds = 8000\n+\n+\n+\n+\n+logged_on = false\n+running = true\n+while running do\n+\n+\twhile !logged_on do\n+\n+\t\tname = \"\"\n+\t\taccessed_user_record = nil\n+\t\t\n+\t\tputs \"\\nWelcome to little ATM. Please log on.\\n\\n\"\n+\n+\t\twhile (name==\"\") do\n+\t\t\tputs \"What is your name?\"\n+\t\t\tprint \">> \"\n+\t\t\tname = gets.chomp\n+\t\t\tif (name==\"\")\n+\t\t\t\tputs \"BS, try again.\\n\\n\"\n+\t\t\tend\n+\t\tend\n+\t\tputs \"\"\n+\n+\t\tpin = \"\"\n+\t\twhile (pin==\"\") do\n+\t\t\tputs \"What is your PIN, #{name}?\"\n+\t\t\tprint \">> \"\n+\t\t\tpin = gets.chomp\n+\n+\t\t\tif (/^\\d{4}$/ !~ pin)\n+\t\t\t\tpin = \"\"\n+\t\t\t\tputs \"invalid PIN: valid format is a 4 digit number.\\n\\n\"\n+\t\t\tend\n+\t\tend\n+\t\tpin = pin.to_i\n+\n+\n+\t\tauthorized_accounts.each do |user|\n+\t\t  if user[:name].eql?(name) && user[:pin] == pin\n+\t\t  \taccessed_user_record = user\n+\t\t    logged_on = true\n+\t\t  end\n+\t\tend\n+\n+\t\tif !logged_on","path":"assignment.rb","position":68,"original_position":68,"commit_id":"564b4442123bee228e5affac38032a46ca60f115","original_commit_id":"564b4442123bee228e5affac38032a46ca60f115","user":{"login":"rpearce","id":592876,"avatar_url":"https://avatars.githubusercontent.com/u/592876?v=3","gravatar_id":"","url":"https://api.github.com/users/rpearce","html_url":"https://github.com/rpearce","followers_url":"https://api.github.com/users/rpearce/followers","following_url":"https://api.github.com/users/rpearce/following{/other_user}","gists_url":"https://api.github.com/users/rpearce/gists{/gist_id}","starred_url":"https://api.github.com/users/rpearce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpearce/subscriptions","organizations_url":"https://api.github.com/users/rpearce/orgs","repos_url":"https://api.github.com/users/rpearce/repos","events_url":"https://api.github.com/users/rpearce/events{/privacy}","received_events_url":"https://api.github.com/users/rpearce/received_events","type":"User","site_admin":false},"body":"same thing here about using `unless` instead of a negative","created_at":"2015-06-23T03:03:11Z","updated_at":"2015-06-23T03:03:11Z","html_url":"https://github.com/GreggDurishan/1.3-ATM/pull/2#discussion_r33005878","pull_request_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/comments/33005878"},"html":{"href":"https://github.com/GreggDurishan/1.3-ATM/pull/2#discussion_r33005878"},"pull_request":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/2","id":38158866,"html_url":"https://github.com/GreggDurishan/1.3-ATM/pull/2","diff_url":"https://github.com/GreggDurishan/1.3-ATM/pull/2.diff","patch_url":"https://github.com/GreggDurishan/1.3-ATM/pull/2.patch","issue_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues/2","number":2,"state":"open","locked":false,"title":"Ged dev to master merge - 1.3-atm","user":{"login":"GreggDurishan","id":12898042,"avatar_url":"https://avatars.githubusercontent.com/u/12898042?v=3","gravatar_id":"","url":"https://api.github.com/users/GreggDurishan","html_url":"https://github.com/GreggDurishan","followers_url":"https://api.github.com/users/GreggDurishan/followers","following_url":"https://api.github.com/users/GreggDurishan/following{/other_user}","gists_url":"https://api.github.com/users/GreggDurishan/gists{/gist_id}","starred_url":"https://api.github.com/users/GreggDurishan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreggDurishan/subscriptions","organizations_url":"https://api.github.com/users/GreggDurishan/orgs","repos_url":"https://api.github.com/users/GreggDurishan/repos","events_url":"https://api.github.com/users/GreggDurishan/events{/privacy}","received_events_url":"https://api.github.com/users/GreggDurishan/received_events","type":"User","site_admin":false},"body":"![2011-02-25-doctor-cat-vs-the-internet](https://cloud.githubusercontent.com/assets/12898042/8265170/087672a0-16c1-11e5-882c-8b513d9dc176.jpg)\r\n\r\nReady for review","created_at":"2015-06-20T00:23:56Z","updated_at":"2015-06-23T03:03:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2360dc4aa71a72918d90b433a661381298458906","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/2/commits","review_comments_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/2/comments","review_comment_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues/2/comments","statuses_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/statuses/564b4442123bee228e5affac38032a46ca60f115","head":{"label":"GreggDurishan:GED-dev","ref":"GED-dev","sha":"564b4442123bee228e5affac38032a46ca60f115","user":{"login":"GreggDurishan","id":12898042,"avatar_url":"https://avatars.githubusercontent.com/u/12898042?v=3","gravatar_id":"","url":"https://api.github.com/users/GreggDurishan","html_url":"https://github.com/GreggDurishan","followers_url":"https://api.github.com/users/GreggDurishan/followers","following_url":"https://api.github.com/users/GreggDurishan/following{/other_user}","gists_url":"https://api.github.com/users/GreggDurishan/gists{/gist_id}","starred_url":"https://api.github.com/users/GreggDurishan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreggDurishan/subscriptions","organizations_url":"https://api.github.com/users/GreggDurishan/orgs","repos_url":"https://api.github.com/users/GreggDurishan/repos","events_url":"https://api.github.com/users/GreggDurishan/events{/privacy}","received_events_url":"https://api.github.com/users/GreggDurishan/received_events","type":"User","site_admin":false},"repo":{"id":37733082,"name":"1.3-ATM","full_name":"GreggDurishan/1.3-ATM","owner":{"login":"GreggDurishan","id":12898042,"avatar_url":"https://avatars.githubusercontent.com/u/12898042?v=3","gravatar_id":"","url":"https://api.github.com/users/GreggDurishan","html_url":"https://github.com/GreggDurishan","followers_url":"https://api.github.com/users/GreggDurishan/followers","following_url":"https://api.github.com/users/GreggDurishan/following{/other_user}","gists_url":"https://api.github.com/users/GreggDurishan/gists{/gist_id}","starred_url":"https://api.github.com/users/GreggDurishan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreggDurishan/subscriptions","organizations_url":"https://api.github.com/users/GreggDurishan/orgs","repos_url":"https://api.github.com/users/GreggDurishan/repos","events_url":"https://api.github.com/users/GreggDurishan/events{/privacy}","received_events_url":"https://api.github.com/users/GreggDurishan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GreggDurishan/1.3-ATM","description":null,"fork":false,"url":"https://api.github.com/repos/GreggDurishan/1.3-ATM","forks_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/forks","keys_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/teams","hooks_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/hooks","issue_events_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues/events{/number}","events_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/events","assignees_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/assignees{/user}","branches_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/branches{/branch}","tags_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/tags","blobs_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/refs{/sha}","trees_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/statuses/{sha}","languages_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/languages","stargazers_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/stargazers","contributors_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/contributors","subscribers_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/subscribers","subscription_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/subscription","commits_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/commits{/sha}","git_commits_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/commits{/sha}","comments_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/comments{/number}","issue_comment_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues/comments{/number}","contents_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/contents/{+path}","compare_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/merges","archive_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/downloads","issues_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues{/number}","pulls_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls{/number}","milestones_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/milestones{/number}","notifications_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/labels{/name}","releases_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/releases{/id}","created_at":"2015-06-19T16:24:16Z","updated_at":"2015-06-19T16:24:16Z","pushed_at":"2015-06-20T00:23:56Z","git_url":"git://github.com/GreggDurishan/1.3-ATM.git","ssh_url":"git@github.com:GreggDurishan/1.3-ATM.git","clone_url":"https://github.com/GreggDurishan/1.3-ATM.git","svn_url":"https://github.com/GreggDurishan/1.3-ATM","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"default_branch":"master"}},"base":{"label":"GreggDurishan:master","ref":"master","sha":"a9eec01b04361b3bbce91ed6caf0b1037169c3de","user":{"login":"GreggDurishan","id":12898042,"avatar_url":"https://avatars.githubusercontent.com/u/12898042?v=3","gravatar_id":"","url":"https://api.github.com/users/GreggDurishan","html_url":"https://github.com/GreggDurishan","followers_url":"https://api.github.com/users/GreggDurishan/followers","following_url":"https://api.github.com/users/GreggDurishan/following{/other_user}","gists_url":"https://api.github.com/users/GreggDurishan/gists{/gist_id}","starred_url":"https://api.github.com/users/GreggDurishan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreggDurishan/subscriptions","organizations_url":"https://api.github.com/users/GreggDurishan/orgs","repos_url":"https://api.github.com/users/GreggDurishan/repos","events_url":"https://api.github.com/users/GreggDurishan/events{/privacy}","received_events_url":"https://api.github.com/users/GreggDurishan/received_events","type":"User","site_admin":false},"repo":{"id":37733082,"name":"1.3-ATM","full_name":"GreggDurishan/1.3-ATM","owner":{"login":"GreggDurishan","id":12898042,"avatar_url":"https://avatars.githubusercontent.com/u/12898042?v=3","gravatar_id":"","url":"https://api.github.com/users/GreggDurishan","html_url":"https://github.com/GreggDurishan","followers_url":"https://api.github.com/users/GreggDurishan/followers","following_url":"https://api.github.com/users/GreggDurishan/following{/other_user}","gists_url":"https://api.github.com/users/GreggDurishan/gists{/gist_id}","starred_url":"https://api.github.com/users/GreggDurishan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreggDurishan/subscriptions","organizations_url":"https://api.github.com/users/GreggDurishan/orgs","repos_url":"https://api.github.com/users/GreggDurishan/repos","events_url":"https://api.github.com/users/GreggDurishan/events{/privacy}","received_events_url":"https://api.github.com/users/GreggDurishan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GreggDurishan/1.3-ATM","description":null,"fork":false,"url":"https://api.github.com/repos/GreggDurishan/1.3-ATM","forks_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/forks","keys_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/teams","hooks_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/hooks","issue_events_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues/events{/number}","events_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/events","assignees_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/assignees{/user}","branches_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/branches{/branch}","tags_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/tags","blobs_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/refs{/sha}","trees_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/statuses/{sha}","languages_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/languages","stargazers_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/stargazers","contributors_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/contributors","subscribers_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/subscribers","subscription_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/subscription","commits_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/commits{/sha}","git_commits_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/git/commits{/sha}","comments_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/comments{/number}","issue_comment_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues/comments{/number}","contents_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/contents/{+path}","compare_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/merges","archive_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/downloads","issues_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues{/number}","pulls_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls{/number}","milestones_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/milestones{/number}","notifications_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/labels{/name}","releases_url":"https://api.github.com/repos/GreggDurishan/1.3-ATM/releases{/id}","created_at":"2015-06-19T16:24:16Z","updated_at":"2015-06-19T16:24:16Z","pushed_at":"2015-06-20T00:23:56Z","git_url":"git://github.com/GreggDurishan/1.3-ATM.git","ssh_url":"git@github.com:GreggDurishan/1.3-ATM.git","clone_url":"https://github.com/GreggDurishan/1.3-ATM.git","svn_url":"https://github.com/GreggDurishan/1.3-ATM","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/2"},"html":{"href":"https://github.com/GreggDurishan/1.3-ATM/pull/2"},"issue":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues/2"},"comments":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/GreggDurishan/1.3-ATM/statuses/564b4442123bee228e5affac38032a46ca60f115"}}}}