Hi Mike. Perhaps you can take this aproach:


 class Dice

  @dices = []

  #so you can keep track of them
  def self.dices
   @dices
  end

  def initialize(sides, selected_dice)
   @sides = sides #: String
   @selected_dice = selected_dice #: Fixnum
   #here the receiver of class() is self, so I'm talking to Dice
   class.dices.<<(self)
  end
 end

 #...whatever

 dice_hash.each_pair do |k, v|
  Dice.new(k, v) #This line creates the instance variable
 end


 See you around. :)

-- 
Posted via http://www.ruby-forum.com/.