Open jrhorn424 opened 8 years ago
43 minutes (1 unit). Left album as an exercise.
This material changed substantially since the last iteration. I thought it went well and was done in time. One thing I did during the talk was add an instance method to one of the example classes, and demonstrate how class methods were not available to instances, and instance methods were not available to the class. I think this helped some people understand the difference between the two.
017 delivery. 3-3:45. 45mins. 1 block.
I followed the advice above and started real simple with just:
class Person
def talk
puts "I am an instance method"
end
def self.speak
puts "I am a class method"
end
end
Person.talk
Person.speak
person = Person.new
person.talk
person.speak
I found the simpler example easier to demonstrate the point and then the more complex example in the Demo shows how it is used in a practical sense.
I mentioned how Rails will have class methods on our models which are classes like User
and we will be able to call things like User.all
as class methods and then user1.email
as instance methods.
35 minutes. Ran short on time. Code along of Albums ended up being an explanation of what code was doing and to discuss the class methods involved vs instance methods.