{"action":"created","issue":{"url":"https://api.github.com/repos/ioscowboi/rockpaperscissors/issues/6","labels_url":"https://api.github.com/repos/ioscowboi/rockpaperscissors/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/ioscowboi/rockpaperscissors/issues/6/comments","events_url":"https://api.github.com/repos/ioscowboi/rockpaperscissors/issues/6/events","html_url":"https://github.com/ioscowboi/rockpaperscissors/issues/6","id":56307156,"number":6,"title":"using self.","user":{"login":"lgklgklgk","id":9873108,"avatar_url":"https://avatars.githubusercontent.com/u/9873108?v=3","gravatar_id":"","url":"https://api.github.com/users/lgklgklgk","html_url":"https://github.com/lgklgklgk","followers_url":"https://api.github.com/users/lgklgklgk/followers","following_url":"https://api.github.com/users/lgklgklgk/following{/other_user}","gists_url":"https://api.github.com/users/lgklgklgk/gists{/gist_id}","starred_url":"https://api.github.com/users/lgklgklgk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgklgklgk/subscriptions","organizations_url":"https://api.github.com/users/lgklgklgk/orgs","repos_url":"https://api.github.com/users/lgklgklgk/repos","events_url":"https://api.github.com/users/lgklgklgk/events{/privacy}","received_events_url":"https://api.github.com/users/lgklgklgk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-02T22:58:12Z","updated_at":"2015-02-03T00:30:40Z","closed_at":null,"body":"This is a purely optional thing, but it was brought to my attention by looking through Usman's code. I'd never used self. with any of my methods before, but Usman was using it all over the place so I figured I'd better learn it. Basically if you name a method self.method you can call it without actually instantiating the class. So in line 52 of your game class instead of instantiating your rules class to the variable who_wins and then calling who_wins.rps_Rules(@player1_move, @player2_move, name1, name2) , you could just rename your method self.rps_Rules and call it without instantiating the class. It's certainly not a big deal but I suppose it makes the code a little cleaner, and I felt it'd be fun to share something I learned today."},"comment":{"url":"https://api.github.com/repos/ioscowboi/rockpaperscissors/issues/comments/72568806","html_url":"https://github.com/ioscowboi/rockpaperscissors/issues/6#issuecomment-72568806","issue_url":"https://api.github.com/repos/ioscowboi/rockpaperscissors/issues/6","id":72568806,"user":{"login":"ioscowboi","id":8541328,"avatar_url":"https://avatars.githubusercontent.com/u/8541328?v=3","gravatar_id":"","url":"https://api.github.com/users/ioscowboi","html_url":"https://github.com/ioscowboi","followers_url":"https://api.github.com/users/ioscowboi/followers","following_url":"https://api.github.com/users/ioscowboi/following{/other_user}","gists_url":"https://api.github.com/users/ioscowboi/gists{/gist_id}","starred_url":"https://api.github.com/users/ioscowboi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioscowboi/subscriptions","organizations_url":"https://api.github.com/users/ioscowboi/orgs","repos_url":"https://api.github.com/users/ioscowboi/repos","events_url":"https://api.github.com/users/ioscowboi/events{/privacy}","received_events_url":"https://api.github.com/users/ioscowboi/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T00:30:40Z","updated_at":"2015-02-03T00:30:40Z","body":"Wow, I know Steven used some advanced methods in his code that I reviewed today. Had no clue how to actually use self. . I'll be looking into to this fo show!"}}