Hi,
I am teaching myself ruby. I would like to be involved in forum. For
now, I’m trying to write a prgram to compare 2 numbers (9,3) using
classes and objects. It is not working.
class Compare
def initialize (int_a, int_b)
@int_a = int_a
@int_b = int_b
end
def compare(int_a, int_b)
if (int_a> int_b)
return int_a
else
return int_b
end
end
2_ints = Compare.new(9, 3)
2_ints.compare