{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments/31572615","id":31572615,"diff_hunk":"@@ -0,0 +1,37 @@\n+module BankAccount\n+\n+  class Account\n+    attr_reader :id, :balance # attributes' default instance method\n+\n+    #class method\n+    def initialize(id, initial_balance)\n+      @id = id\n+      @balance = initial_balance #local variable\n+      # made initial balance equal to instance variable balance, which actually turns out to be the current balance\n+\n+      #this raises an error to prevent the initial balance from being lower than 0\n+      unless @balance >= 0\n+        raise ArgumentError.new(\"You can't start out with a negative balance. Add some monies\")\n+      end\n+    end\n+\n+    def withdraw(amount)\n+\n+  # If the amount to withdraw is greater than the current balance, it throws and error and returns the original balance\n+      unless @balance >= amount","path":"lib/bank_account/account.rb","position":21,"original_position":21,"commit_id":"9a3978f5e0c97581703b0c785ee77f3a69e3be45","original_commit_id":"9a3978f5e0c97581703b0c785ee77f3a69e3be45","user":{"login":"brigid2718","id":6446316,"avatar_url":"https://avatars.githubusercontent.com/u/6446316?v=3","gravatar_id":"","url":"https://api.github.com/users/brigid2718","html_url":"https://github.com/brigid2718","followers_url":"https://api.github.com/users/brigid2718/followers","following_url":"https://api.github.com/users/brigid2718/following{/other_user}","gists_url":"https://api.github.com/users/brigid2718/gists{/gist_id}","starred_url":"https://api.github.com/users/brigid2718/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brigid2718/subscriptions","organizations_url":"https://api.github.com/users/brigid2718/orgs","repos_url":"https://api.github.com/users/brigid2718/repos","events_url":"https://api.github.com/users/brigid2718/events{/privacy}","received_events_url":"https://api.github.com/users/brigid2718/received_events","type":"User","site_admin":false},"body":"I tend to only use `unless` when it makes a ton of sense.  If I was telling someone what this function does (which you did in the comment above), I would use `if` instead.  So something like this instead:\r\n```\r\nif amount >= @balance\r\n  puts \"You can't overdraw. Your balance is still $#{@balance}.\"\r\n```\r\n\r\nAlso, I'm noticing that this function returns @balance in the first part of the conditional, but the second part doesn't return @balance.  You don't need that line that says `return @balance`\r\n\r\n","created_at":"2015-06-02T21:20:54Z","updated_at":"2015-06-02T21:20:54Z","html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/2#discussion_r31572615","pull_request_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments/31572615"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/2#discussion_r31572615"},"pull_request":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/2","id":36558430,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/2","diff_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/2.diff","patch_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/2.patch","issue_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/2","number":2,"state":"open","locked":false,"title":"Bank Account Breakfast","user":{"login":"wangg131","id":10188898,"avatar_url":"https://avatars.githubusercontent.com/u/10188898?v=3","gravatar_id":"","url":"https://api.github.com/users/wangg131","html_url":"https://github.com/wangg131","followers_url":"https://api.github.com/users/wangg131/followers","following_url":"https://api.github.com/users/wangg131/following{/other_user}","gists_url":"https://api.github.com/users/wangg131/gists{/gist_id}","starred_url":"https://api.github.com/users/wangg131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangg131/subscriptions","organizations_url":"https://api.github.com/users/wangg131/orgs","repos_url":"https://api.github.com/users/wangg131/repos","events_url":"https://api.github.com/users/wangg131/events{/privacy}","received_events_url":"https://api.github.com/users/wangg131/received_events","type":"User","site_admin":false},"body":"I finished everything through breakfast. Please let me know if I am repeating myself unnecessarily in my code and rspec. I also accidentally pushed my terminal log so please ignore that. I figure out how to delete it at a later time. Also, more comments and possibly revisions to Bank Account breakfast to come. I just wanted to make the pull request now since I met all the requirements and can refactor later if I have time. Thanks","created_at":"2015-05-30T02:27:54Z","updated_at":"2015-06-02T21:20:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"653499062f01e29cf09accccbe67c8b728c820d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/2/commits","review_comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/2/comments","review_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/2/comments","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/9a3978f5e0c97581703b0c785ee77f3a69e3be45","head":{"label":"wangg131:lw/master","ref":"lw/master","sha":"9a3978f5e0c97581703b0c785ee77f3a69e3be45","user":{"login":"wangg131","id":10188898,"avatar_url":"https://avatars.githubusercontent.com/u/10188898?v=3","gravatar_id":"","url":"https://api.github.com/users/wangg131","html_url":"https://github.com/wangg131","followers_url":"https://api.github.com/users/wangg131/followers","following_url":"https://api.github.com/users/wangg131/following{/other_user}","gists_url":"https://api.github.com/users/wangg131/gists{/gist_id}","starred_url":"https://api.github.com/users/wangg131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangg131/subscriptions","organizations_url":"https://api.github.com/users/wangg131/orgs","repos_url":"https://api.github.com/users/wangg131/repos","events_url":"https://api.github.com/users/wangg131/events{/privacy}","received_events_url":"https://api.github.com/users/wangg131/received_events","type":"User","site_admin":false},"repo":{"id":36467670,"name":"C3Projects--BankAccounts","full_name":"wangg131/C3Projects--BankAccounts","owner":{"login":"wangg131","id":10188898,"avatar_url":"https://avatars.githubusercontent.com/u/10188898?v=3","gravatar_id":"","url":"https://api.github.com/users/wangg131","html_url":"https://github.com/wangg131","followers_url":"https://api.github.com/users/wangg131/followers","following_url":"https://api.github.com/users/wangg131/following{/other_user}","gists_url":"https://api.github.com/users/wangg131/gists{/gist_id}","starred_url":"https://api.github.com/users/wangg131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangg131/subscriptions","organizations_url":"https://api.github.com/users/wangg131/orgs","repos_url":"https://api.github.com/users/wangg131/repos","events_url":"https://api.github.com/users/wangg131/events{/privacy}","received_events_url":"https://api.github.com/users/wangg131/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wangg131/C3Projects--BankAccounts","description":"","fork":true,"url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts","forks_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/forks","keys_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/teams","hooks_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/hooks","issue_events_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/issues/events{/number}","events_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/events","assignees_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/assignees{/user}","branches_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/branches{/branch}","tags_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/tags","blobs_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/git/refs{/sha}","trees_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/statuses/{sha}","languages_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/languages","stargazers_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/stargazers","contributors_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/contributors","subscribers_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/subscribers","subscription_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/subscription","commits_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/commits{/sha}","git_commits_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/git/commits{/sha}","comments_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/comments{/number}","issue_comment_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/issues/comments{/number}","contents_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/contents/{+path}","compare_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/merges","archive_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/downloads","issues_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/issues{/number}","pulls_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/pulls{/number}","milestones_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/milestones{/number}","notifications_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/labels{/name}","releases_url":"https://api.github.com/repos/wangg131/C3Projects--BankAccounts/releases{/id}","created_at":"2015-05-28T21:40:18Z","updated_at":"2015-05-28T21:16:52Z","pushed_at":"2015-05-30T18:02:41Z","git_url":"git://github.com/wangg131/C3Projects--BankAccounts.git","ssh_url":"git@github.com:wangg131/C3Projects--BankAccounts.git","clone_url":"https://github.com/wangg131/C3Projects--BankAccounts.git","svn_url":"https://github.com/wangg131/C3Projects--BankAccounts","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":null,"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":"Ada-Developers-Academy:lw/master","ref":"lw/master","sha":"fa717356ead95250b675cdb4012b94d95aa3b0ad","user":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":36466643,"name":"C3Projects--BankAccounts","full_name":"Ada-Developers-Academy/C3Projects--BankAccounts","owner":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts","description":"","fork":false,"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts","forks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/forks","keys_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/teams","hooks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/hooks","issue_events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/events","assignees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/tags","blobs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/languages","stargazers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/stargazers","contributors_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/contributors","subscribers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/subscribers","subscription_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/subscription","commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/merges","archive_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/downloads","issues_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/labels{/name}","releases_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/releases{/id}","created_at":"2015-05-28T21:16:52Z","updated_at":"2015-05-28T21:16:52Z","pushed_at":"2015-06-02T04:08:57Z","git_url":"git://github.com/Ada-Developers-Academy/C3Projects--BankAccounts.git","ssh_url":"git@github.com:Ada-Developers-Academy/C3Projects--BankAccounts.git","clone_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts.git","svn_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts","homepage":null,"size":1318,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":24,"forks":25,"open_issues":24,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/2"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/2"},"issue":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/2"},"comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/9a3978f5e0c97581703b0c785ee77f3a69e3be45"}}}}