{"action":"created","comment":{"url":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/comments/40879302","id":40879302,"diff_hunk":"@@ -47,35 +49,25 @@ - (IBAction)buttonPressed:(UIButton *)sender {\n     \n     //calculate the amount of alcohol in the beer\n     int numberOfBeers = self.beerCountSlider.value;\n-    int ouncesInOneBeerGlass = 12; //assumed 12oz bottles\n-    float alcoholPercentageOfBeer = [self.beerPercentTextField.text floatValue] / 100;\n-    float ouncesOfAlcoholPerBeer = ouncesInOneBeerGlass * alcoholPercentageOfBeer;\n-    float ouncesOfAlcoholTotal = numberOfBeers * ouncesOfAlcoholPerBeer;\n-\n-    //now calculate the equivalent of wine . . .\n-    float ouncesOfWineInOneGlass = 5; //assumed 5oz glass\n-    float alcoholPercentageOfWine = 0.13; //assumed average\n-    float ouncesOfAlcoholPerGlassOfWine = ouncesOfWineInOneGlass * alcoholPercentageOfWine;\n-    float numberOfWineGlassesEquivalentToNumberOfBeers = ouncesOfAlcoholTotal / ouncesOfAlcoholPerGlassOfWine;\n     \n-    //decide whether to use beers or beer, glass or glasses\n-    NSString *beerText;\n-    if ( numberOfBeers == 1 ) {\n-        beerText = NSLocalizedString(@\"beer\", @\"singular beer\");\n-    } else {\n-        beerText = NSLocalizedString(@\"beers\", @\"plural of beer\");\n-    }\n+    Beer *myBeer = [[Beer alloc] init];","path":"Alcolator/Alcolator/ViewController.m","position":31,"original_position":31,"commit_id":"f6b2e09aeb2369c25759bd647803c3d2a851edb2","original_commit_id":"f6b2e09aeb2369c25759bd647803c3d2a851edb2","user":{"login":"mhanlon","id":5395845,"avatar_url":"https://avatars.githubusercontent.com/u/5395845?v=3","gravatar_id":"","url":"https://api.github.com/users/mhanlon","html_url":"https://github.com/mhanlon","followers_url":"https://api.github.com/users/mhanlon/followers","following_url":"https://api.github.com/users/mhanlon/following{/other_user}","gists_url":"https://api.github.com/users/mhanlon/gists{/gist_id}","starred_url":"https://api.github.com/users/mhanlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhanlon/subscriptions","organizations_url":"https://api.github.com/users/mhanlon/orgs","repos_url":"https://api.github.com/users/mhanlon/repos","events_url":"https://api.github.com/users/mhanlon/events{/privacy}","received_events_url":"https://api.github.com/users/mhanlon/received_events","type":"User","site_admin":false},"body":"I might create a property on the view controllers... for example, on this `ViewController` I would create something like this:\r\n```\r\n@property (strong, nonatomic) Beer* beer;\r\n@property (strong, nonatomic) Wine* wine;\r\n```\r\n\r\nAnd then, in `- (void)viewDidLoad` I would initialize them... in `WhiskeyViewController` it's kind of handy because you only need to initialize and declare a `whiskey` property.\r\n\r\nWe'll need to update the alcohol percentage of the beer if that text field ever changes, but this might be best (because right now, with this implementation, we instantiate a new `Beer` object and `Wine` or `Whiskey` object every time someone press the calculate button.","created_at":"2015-10-01T05:03:03Z","updated_at":"2015-10-01T05:03:03Z","html_url":"https://github.com/maddenwalker/Alcolator/pull/1#discussion_r40879302","pull_request_url":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/comments/40879302"},"html":{"href":"https://github.com/maddenwalker/Alcolator/pull/1#discussion_r40879302"},"pull_request":{"href":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/1","id":46483170,"html_url":"https://github.com/maddenwalker/Alcolator/pull/1","diff_url":"https://github.com/maddenwalker/Alcolator/pull/1.diff","patch_url":"https://github.com/maddenwalker/Alcolator/pull/1.patch","issue_url":"https://api.github.com/repos/maddenwalker/Alcolator/issues/1","number":1,"state":"open","locked":false,"title":"Refactor calculations code ","user":{"login":"mhanlon","id":5395845,"avatar_url":"https://avatars.githubusercontent.com/u/5395845?v=3","gravatar_id":"","url":"https://api.github.com/users/mhanlon","html_url":"https://github.com/mhanlon","followers_url":"https://api.github.com/users/mhanlon/followers","following_url":"https://api.github.com/users/mhanlon/following{/other_user}","gists_url":"https://api.github.com/users/mhanlon/gists{/gist_id}","starred_url":"https://api.github.com/users/mhanlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhanlon/subscriptions","organizations_url":"https://api.github.com/users/mhanlon/orgs","repos_url":"https://api.github.com/users/mhanlon/repos","events_url":"https://api.github.com/users/mhanlon/events{/privacy}","received_events_url":"https://api.github.com/users/mhanlon/received_events","type":"User","site_admin":false},"body":"Just a pull request to annotate The Refactoring (tm).","created_at":"2015-10-01T04:09:43Z","updated_at":"2015-10-01T05:03:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4280e49c5a1a1267e3a89a3920bf79187cd8710e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/1/commits","review_comments_url":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/1/comments","review_comment_url":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maddenwalker/Alcolator/issues/1/comments","statuses_url":"https://api.github.com/repos/maddenwalker/Alcolator/statuses/f6b2e09aeb2369c25759bd647803c3d2a851edb2","head":{"label":"maddenwalker:refactor-calculations-code","ref":"refactor-calculations-code","sha":"f6b2e09aeb2369c25759bd647803c3d2a851edb2","user":{"login":"maddenwalker","id":4708711,"avatar_url":"https://avatars.githubusercontent.com/u/4708711?v=3","gravatar_id":"","url":"https://api.github.com/users/maddenwalker","html_url":"https://github.com/maddenwalker","followers_url":"https://api.github.com/users/maddenwalker/followers","following_url":"https://api.github.com/users/maddenwalker/following{/other_user}","gists_url":"https://api.github.com/users/maddenwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/maddenwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddenwalker/subscriptions","organizations_url":"https://api.github.com/users/maddenwalker/orgs","repos_url":"https://api.github.com/users/maddenwalker/repos","events_url":"https://api.github.com/users/maddenwalker/events{/privacy}","received_events_url":"https://api.github.com/users/maddenwalker/received_events","type":"User","site_admin":false},"repo":{"id":43410921,"name":"Alcolator","full_name":"maddenwalker/Alcolator","owner":{"login":"maddenwalker","id":4708711,"avatar_url":"https://avatars.githubusercontent.com/u/4708711?v=3","gravatar_id":"","url":"https://api.github.com/users/maddenwalker","html_url":"https://github.com/maddenwalker","followers_url":"https://api.github.com/users/maddenwalker/followers","following_url":"https://api.github.com/users/maddenwalker/following{/other_user}","gists_url":"https://api.github.com/users/maddenwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/maddenwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddenwalker/subscriptions","organizations_url":"https://api.github.com/users/maddenwalker/orgs","repos_url":"https://api.github.com/users/maddenwalker/repos","events_url":"https://api.github.com/users/maddenwalker/events{/privacy}","received_events_url":"https://api.github.com/users/maddenwalker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maddenwalker/Alcolator","description":"","fork":false,"url":"https://api.github.com/repos/maddenwalker/Alcolator","forks_url":"https://api.github.com/repos/maddenwalker/Alcolator/forks","keys_url":"https://api.github.com/repos/maddenwalker/Alcolator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maddenwalker/Alcolator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maddenwalker/Alcolator/teams","hooks_url":"https://api.github.com/repos/maddenwalker/Alcolator/hooks","issue_events_url":"https://api.github.com/repos/maddenwalker/Alcolator/issues/events{/number}","events_url":"https://api.github.com/repos/maddenwalker/Alcolator/events","assignees_url":"https://api.github.com/repos/maddenwalker/Alcolator/assignees{/user}","branches_url":"https://api.github.com/repos/maddenwalker/Alcolator/branches{/branch}","tags_url":"https://api.github.com/repos/maddenwalker/Alcolator/tags","blobs_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/refs{/sha}","trees_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maddenwalker/Alcolator/statuses/{sha}","languages_url":"https://api.github.com/repos/maddenwalker/Alcolator/languages","stargazers_url":"https://api.github.com/repos/maddenwalker/Alcolator/stargazers","contributors_url":"https://api.github.com/repos/maddenwalker/Alcolator/contributors","subscribers_url":"https://api.github.com/repos/maddenwalker/Alcolator/subscribers","subscription_url":"https://api.github.com/repos/maddenwalker/Alcolator/subscription","commits_url":"https://api.github.com/repos/maddenwalker/Alcolator/commits{/sha}","git_commits_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/commits{/sha}","comments_url":"https://api.github.com/repos/maddenwalker/Alcolator/comments{/number}","issue_comment_url":"https://api.github.com/repos/maddenwalker/Alcolator/issues/comments{/number}","contents_url":"https://api.github.com/repos/maddenwalker/Alcolator/contents/{+path}","compare_url":"https://api.github.com/repos/maddenwalker/Alcolator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maddenwalker/Alcolator/merges","archive_url":"https://api.github.com/repos/maddenwalker/Alcolator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maddenwalker/Alcolator/downloads","issues_url":"https://api.github.com/repos/maddenwalker/Alcolator/issues{/number}","pulls_url":"https://api.github.com/repos/maddenwalker/Alcolator/pulls{/number}","milestones_url":"https://api.github.com/repos/maddenwalker/Alcolator/milestones{/number}","notifications_url":"https://api.github.com/repos/maddenwalker/Alcolator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maddenwalker/Alcolator/labels{/name}","releases_url":"https://api.github.com/repos/maddenwalker/Alcolator/releases{/id}","created_at":"2015-09-30T04:06:19Z","updated_at":"2015-09-30T04:21:03Z","pushed_at":"2015-10-01T04:09:43Z","git_url":"git://github.com/maddenwalker/Alcolator.git","ssh_url":"git@github.com:maddenwalker/Alcolator.git","clone_url":"https://github.com/maddenwalker/Alcolator.git","svn_url":"https://github.com/maddenwalker/Alcolator","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","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":"maddenwalker:checkpoint-20-implementing-calculations","ref":"checkpoint-20-implementing-calculations","sha":"61dbc23fc72b713e8cb5b9b936e16ae380044a92","user":{"login":"maddenwalker","id":4708711,"avatar_url":"https://avatars.githubusercontent.com/u/4708711?v=3","gravatar_id":"","url":"https://api.github.com/users/maddenwalker","html_url":"https://github.com/maddenwalker","followers_url":"https://api.github.com/users/maddenwalker/followers","following_url":"https://api.github.com/users/maddenwalker/following{/other_user}","gists_url":"https://api.github.com/users/maddenwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/maddenwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddenwalker/subscriptions","organizations_url":"https://api.github.com/users/maddenwalker/orgs","repos_url":"https://api.github.com/users/maddenwalker/repos","events_url":"https://api.github.com/users/maddenwalker/events{/privacy}","received_events_url":"https://api.github.com/users/maddenwalker/received_events","type":"User","site_admin":false},"repo":{"id":43410921,"name":"Alcolator","full_name":"maddenwalker/Alcolator","owner":{"login":"maddenwalker","id":4708711,"avatar_url":"https://avatars.githubusercontent.com/u/4708711?v=3","gravatar_id":"","url":"https://api.github.com/users/maddenwalker","html_url":"https://github.com/maddenwalker","followers_url":"https://api.github.com/users/maddenwalker/followers","following_url":"https://api.github.com/users/maddenwalker/following{/other_user}","gists_url":"https://api.github.com/users/maddenwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/maddenwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddenwalker/subscriptions","organizations_url":"https://api.github.com/users/maddenwalker/orgs","repos_url":"https://api.github.com/users/maddenwalker/repos","events_url":"https://api.github.com/users/maddenwalker/events{/privacy}","received_events_url":"https://api.github.com/users/maddenwalker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maddenwalker/Alcolator","description":"","fork":false,"url":"https://api.github.com/repos/maddenwalker/Alcolator","forks_url":"https://api.github.com/repos/maddenwalker/Alcolator/forks","keys_url":"https://api.github.com/repos/maddenwalker/Alcolator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maddenwalker/Alcolator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maddenwalker/Alcolator/teams","hooks_url":"https://api.github.com/repos/maddenwalker/Alcolator/hooks","issue_events_url":"https://api.github.com/repos/maddenwalker/Alcolator/issues/events{/number}","events_url":"https://api.github.com/repos/maddenwalker/Alcolator/events","assignees_url":"https://api.github.com/repos/maddenwalker/Alcolator/assignees{/user}","branches_url":"https://api.github.com/repos/maddenwalker/Alcolator/branches{/branch}","tags_url":"https://api.github.com/repos/maddenwalker/Alcolator/tags","blobs_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/refs{/sha}","trees_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maddenwalker/Alcolator/statuses/{sha}","languages_url":"https://api.github.com/repos/maddenwalker/Alcolator/languages","stargazers_url":"https://api.github.com/repos/maddenwalker/Alcolator/stargazers","contributors_url":"https://api.github.com/repos/maddenwalker/Alcolator/contributors","subscribers_url":"https://api.github.com/repos/maddenwalker/Alcolator/subscribers","subscription_url":"https://api.github.com/repos/maddenwalker/Alcolator/subscription","commits_url":"https://api.github.com/repos/maddenwalker/Alcolator/commits{/sha}","git_commits_url":"https://api.github.com/repos/maddenwalker/Alcolator/git/commits{/sha}","comments_url":"https://api.github.com/repos/maddenwalker/Alcolator/comments{/number}","issue_comment_url":"https://api.github.com/repos/maddenwalker/Alcolator/issues/comments{/number}","contents_url":"https://api.github.com/repos/maddenwalker/Alcolator/contents/{+path}","compare_url":"https://api.github.com/repos/maddenwalker/Alcolator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maddenwalker/Alcolator/merges","archive_url":"https://api.github.com/repos/maddenwalker/Alcolator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maddenwalker/Alcolator/downloads","issues_url":"https://api.github.com/repos/maddenwalker/Alcolator/issues{/number}","pulls_url":"https://api.github.com/repos/maddenwalker/Alcolator/pulls{/number}","milestones_url":"https://api.github.com/repos/maddenwalker/Alcolator/milestones{/number}","notifications_url":"https://api.github.com/repos/maddenwalker/Alcolator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maddenwalker/Alcolator/labels{/name}","releases_url":"https://api.github.com/repos/maddenwalker/Alcolator/releases{/id}","created_at":"2015-09-30T04:06:19Z","updated_at":"2015-09-30T04:21:03Z","pushed_at":"2015-10-01T04:09:43Z","git_url":"git://github.com/maddenwalker/Alcolator.git","ssh_url":"git@github.com:maddenwalker/Alcolator.git","clone_url":"https://github.com/maddenwalker/Alcolator.git","svn_url":"https://github.com/maddenwalker/Alcolator","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","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/maddenwalker/Alcolator/pulls/1"},"html":{"href":"https://github.com/maddenwalker/Alcolator/pull/1"},"issue":{"href":"https://api.github.com/repos/maddenwalker/Alcolator/issues/1"},"comments":{"href":"https://api.github.com/repos/maddenwalker/Alcolator/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maddenwalker/Alcolator/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/maddenwalker/Alcolator/statuses/f6b2e09aeb2369c25759bd647803c3d2a851edb2"}}}}