{"action":"created","issue":{"url":"https://api.github.com/repos/ga-dc/gladiator/issues/6","labels_url":"https://api.github.com/repos/ga-dc/gladiator/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/ga-dc/gladiator/issues/6/comments","events_url":"https://api.github.com/repos/ga-dc/gladiator/issues/6/events","html_url":"https://github.com/ga-dc/gladiator/pull/6","id":95952622,"number":6,"title":"Alexbannon solution","user":{"login":"alexbannon","id":12821988,"avatar_url":"https://avatars.githubusercontent.com/u/12821988?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbannon","html_url":"https://github.com/alexbannon","followers_url":"https://api.github.com/users/alexbannon/followers","following_url":"https://api.github.com/users/alexbannon/following{/other_user}","gists_url":"https://api.github.com/users/alexbannon/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbannon/subscriptions","organizations_url":"https://api.github.com/users/alexbannon/orgs","repos_url":"https://api.github.com/users/alexbannon/repos","events_url":"https://api.github.com/users/alexbannon/events{/privacy}","received_events_url":"https://api.github.com/users/alexbannon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-19T22:06:31Z","updated_at":"2015-07-24T00:23:52Z","closed_at":"2015-07-24T00:23:52Z","pull_request":{"url":"https://api.github.com/repos/ga-dc/gladiator/pulls/6","html_url":"https://github.com/ga-dc/gladiator/pull/6","diff_url":"https://github.com/ga-dc/gladiator/pull/6.diff","patch_url":"https://github.com/ga-dc/gladiator/pull/6.patch"},"body":"- comfort: 4/5\r\n- completeness: 5/5\r\n\r\n# Questions:\r\n\r\n- How do you pull an instance method out into a new class? Or is this even possible? arena.fight was getting a bit crowded, but I have no real idea how to separate things out and possibly make it more DRY.\r\n\r\n- Not 100% sure where I'm going wrong with the code in my entertained section. Thought it was pretty straightforward. If maximus is in @gladiators, @crowd_entertainment = true. If not, not.\r\n\r\n- Not a question but just a bit of my info: I'm getting really confused with terminology. Instance v class v method v object. If you create some output with a class, that's an instance? But you can't access that instance outside the class. But class variables you can. Bah! Hopefully I'll get it with time."},"comment":{"url":"https://api.github.com/repos/ga-dc/gladiator/issues/comments/124275963","html_url":"https://github.com/ga-dc/gladiator/pull/6#issuecomment-124275963","issue_url":"https://api.github.com/repos/ga-dc/gladiator/issues/6","id":124275963,"user":{"login":"RobertAKARobin","id":6268177,"avatar_url":"https://avatars.githubusercontent.com/u/6268177?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertAKARobin","html_url":"https://github.com/RobertAKARobin","followers_url":"https://api.github.com/users/RobertAKARobin/followers","following_url":"https://api.github.com/users/RobertAKARobin/following{/other_user}","gists_url":"https://api.github.com/users/RobertAKARobin/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertAKARobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertAKARobin/subscriptions","organizations_url":"https://api.github.com/users/RobertAKARobin/orgs","repos_url":"https://api.github.com/users/RobertAKARobin/repos","events_url":"https://api.github.com/users/RobertAKARobin/events{/privacy}","received_events_url":"https://api.github.com/users/RobertAKARobin/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T00:23:52Z","updated_at":"2015-07-24T00:23:52Z","body":"- Good question! You can see an example of that here: https://github.com/ga-dc/gladiator/blob/solution/models.rb\r\n- Can you be more specific about the error or unexpected behavior you were getting?\r\n- Yeah, those are confusing. Check this out:\r\n```\r\nclass Car\r\n  attr_accessor :model, :wheel_shape\r\n  @@wheel_shape = \"round\"\r\n  def initialize my_cars_make\r\n    @make =  my_cars_make\r\n  end\r\n  def start\r\n    noise = \"Vroom vroom\"\r\n  end\r\nend\r\n\r\nmy_car = Car.new \"Toyota\"\r\n```\r\n\r\n`my_car` is an instance of the `Car` class. `@make` is an instance variable, available to all methods of `my_car`. Using `attr_accessor` makes it also available outside the object, as in `my_car.make`.\r\n\r\n`my_car` is also an Object. `Object` is a special class in Ruby, and every other class inherits from it, whether you want it to or not.\r\n\r\n`noise` is a local variable, available only inside the `start` method.\r\n\r\n`wheel_shape` is a class variable. I can't do `Car.make`; I can do `Car.wheel_shape`."}}