Build a Monster Class: Part 12:56 with Jason Seifer
In this stage, we'll be working towards creating our own class that uses blocks, arrays, hashes, and more. In this video, we'll create the shell class that will hold our monster.
class Monster attr_reader :name def initialize(name) @name = name end end
Here's how we can initialize it:
monster = Monster.new("Fluffy")
You need to sign up for Treehouse in order to download course files.Sign up