Replace my symbolobject

I havea symbolobject which i use as a array later. the definition is
class SymbolObject

def initialize(symb)
   puts symb

attr_accessor :symbol,:name ,:exchange, :news, :summary, :sector,
def to_s
return @symbol + @news + @exchange + @name
def <=>(other)
return [@symb, @name, @exchange] <=> [other.symb,,]


Issuethat i see

  1. As i create a symbol object, i add it to a array. However i have no
    means of sorting the symbol objects based on its properties or use
    indexed seeks etc.
  2. how to i either enhance the symbolobject or replace it with
    somethingelse that provides a object like view but can be indexed and
    sorted. Is there a collection object or Record object in ruby. i am
    open for any other options.