Ruby setter-methods: Is the equal-character (=) a convention or functionality?
Taken this class as a example:
How to extend an object in Ruby?
Say, I have an object that replies to .hello
method. Now, I want to create another object that will reply to both hello
(and all other methods of the original object) and bye
methods. Something like this:
Ruby OOP classes interaction: Which way to update instance variables?
I have 2 classes: Game and Player. This is a Tic-tac-toe game.
Ruby OOP: What causes NameError in Game Object?
I am learning OOP with Ruby. I have 2 classes – Game & Player.
Player and Computer are to be created for Tick-Tack-Toe game. My idea is to use Player class to create a player and a computer for the game.