Initializing Objects
Learn how we initialize objects in Ruby.
Let’s start over and define a new class.
Remember that objects can be thought of as two things. They know stuff, and they can do things.
Let’s define a Person
class. People obviously also know things and can do things.
Here’s how to define a new empty Person
class:
class Person
end
Again, that’s not a very useful class, but we can instantiate it and ...