{"action":"opened","issue":{"url":"https://api.github.com/repos/lemonsweets/oystercard/issues/5","labels_url":"https://api.github.com/repos/lemonsweets/oystercard/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/lemonsweets/oystercard/issues/5/comments","events_url":"https://api.github.com/repos/lemonsweets/oystercard/issues/5/events","html_url":"https://github.com/lemonsweets/oystercard/issues/5","id":102376618,"number":5,"title":"Enable top up functionality","user":{"login":"lemonsweets","id":12461822,"avatar_url":"https://avatars.githubusercontent.com/u/12461822?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonsweets","html_url":"https://github.com/lemonsweets","followers_url":"https://api.github.com/users/lemonsweets/followers","following_url":"https://api.github.com/users/lemonsweets/following{/other_user}","gists_url":"https://api.github.com/users/lemonsweets/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonsweets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonsweets/subscriptions","organizations_url":"https://api.github.com/users/lemonsweets/orgs","repos_url":"https://api.github.com/users/lemonsweets/repos","events_url":"https://api.github.com/users/lemonsweets/events{/privacy}","received_events_url":"https://api.github.com/users/lemonsweets/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-21T13:06:21Z","updated_at":"2015-08-21T13:06:21Z","closed_at":null,"body":"Now that you have an card that can have a balance, you want to make sure it can be topped up.\n\nWrite a new test that checks that if a `top_up` method is invoked with the top up value as the argument, the balance of the card will increase by that amount.\n\n## Skills you will learn:\n- S160: Updating the value of an instance variable\n- S161: Using a shorthand notation for addition and assignment in one go\n- S162: Using an implicit `return` statement\n\n## Interview questions you may expect:\n- I163: When do you have to use a `return` statement in Ruby and when can you omit it?\n- I164: What are instance variables and how they are different from local variables?\n- I165: How can you access instance variable outside the instance they belong to?\n- I166: What is the red/green/refactor cycle? Give me an example of using it.\n\n## To complete this challenge:\n- [ ] Write a test for the `top_up` method\n- [ ] Make sure the test fails before implementing the method\n- [ ] Implement the method to make the test pass\n\n## Suggested resources:\n- [RSpec](http://rspec.info/)\n- [TDD on Wikipedia](https://en.wikipedia.org/wiki/Test-driven_development)\n- [RubyMonk](https://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/45-more-classes/lessons/110-instance-variables)\n"}}