From: Joel Pearson Date: 2013-06-27T21:21:28+09:00 Subject: Re: Designing a Cabinet class The key here is to understand instance variables. That's these: @one, @two, @three Those variables are unique to each Instance of your Class. That means they hold the "state" of an individual Cabinet. All you need to do is to set the value of @one, @two, or @three inside your methods. There are a lot of ways to go about doing this, but we'll run with a basic one for now: def place puts "What would you like to put into the cabinet?" thing = gets.chomp puts "What drawer number would you like to place #{thing} in? One, two, or three?" drawer_number = gets.chomp.downcase case drawer_number when 'one' @one = thing puts "#{thing} has been placed in drawer one." when 'two' @two = thing puts "#{thing} has been placed in drawer two." when 'three' @three = thing puts "#{thing} has been placed in drawer three." else puts "I'm sorry, please select from one, two, or three." end end def remove(thing) #a method to remove an object from a drawer # Question code here... # Remove the object, for example: @one = nil end -- Posted via http://www.ruby-forum.com/.