A basic class consists only of the
class keyword and the name of the class. Check it out:
class NewClass # Class magic here end
NewClass has the ability to create new Ruby objects of class
NewClass (just like
"Hello!" is a
4 is a
Fixnum). By convention, class names start with a capital letter and use CamelCase instead of relying_on_underscores.
Create a class called
Person in the editor. Don’t put anything between
class Person and
end just yet.