Ruby - Classes and Objects
What will be the output of this Ruby code?
class Cat
def initialize(name)
@name = name
end
def show_self
self
end
end
c = Cat.new('Milo')
puts c.show_self