------=_NextPart_000_01E4_01C50162.DDB72FC0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Attached is my attempt at learning some ruby reflection. I still have a long way to go. -----Original Message----- From: Ruby Quiz [mailto:james / grayproductions.net] Sent: Friday, January 21, 2005 7:19 AM To: ruby-talk ML Subject: [QUIZ] Paper Rock Scissors (#16) The three rules of Ruby Quiz: 1. Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. 2. Support Ruby Quiz by submitting ideas as often as you can: http://www.grayproductions.net/ruby_quiz/ 3. Enjoy! ------=_NextPart_000_01E4_01C50162.DDB72FC0 Content-Type: application/octet-stream; name="lrm_jedi_player.rb" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="lrm_jedi_player.rb" class LRMJediPlayer < Player def initialize( opponent ) super @done = false end def choose unless @done ObjectSpace.each_object(Player) { |p| unless p.class == Player || p.instance_of?(self.class) def p.choose :rock end end } @done = true end :paper end end ------=_NextPart_000_01E4_01C50162.DDB72FC0--