MΓ³dulo 03 Β· Classes & Modules β LecciΓ³n 1 de 6 Β· ~11 min
Your First Class
class β¦ end β a blueprint, same idea as Swift/Python
You've built classes before: Swift's class/struct, Python's class Walker:. Ruby's version looks like everything else in this course β no braces, no colon, just class opening the block and end closing it:
class Walker end
That alone is a complete (if useless) class. Walker.new would already work, handing back an empty instance. The interesting part is what you put inside.