J
junkone
Hi
I havea a class with this structure. how do i check if 2 objects
instanialted from this class are equal. they could be separate
instantialtion but have exactly the same values?
class SymbolObject
def initialize(symb)
puts symb
@symbol=symb
@name=@exchange=@news=@summary=@sector=@industry=@category=@otherInfo=@scanType=""
@markedBad=false
end
attr_accessor :symbol,:name ,:exchange, :news, :summary, :sector,
:industry,:category,:markedBad,:scanType,therInfo;
def to_s
return @symbol + @news + @exchange + @name
end
end
I havea a class with this structure. how do i check if 2 objects
instanialted from this class are equal. they could be separate
instantialtion but have exactly the same values?
class SymbolObject
def initialize(symb)
puts symb
@symbol=symb
@name=@exchange=@news=@summary=@sector=@industry=@category=@otherInfo=@scanType=""
@markedBad=false
end
attr_accessor :symbol,:name ,:exchange, :news, :summary, :sector,
:industry,:category,:markedBad,:scanType,therInfo;
def to_s
return @symbol + @news + @exchange + @name
end
end