Everything Is An Object in Ruby (Proof)
Learn about the class of different objects in Ruby.
We'll cover the following...
We'll cover the following...
The is_a? method
We know that 123.class returns an integer, and blabla.class returns a string. However, every object also has is_a? method, which returns either true or false, depending on the parameter we’re passing to that method:
$ irb
> 123.is_a?(Integer)
=> true
In the example above, we’re calling the is_a? method for the 123 ...