title: Storing a proc inside an array inside a hash
body: <p>I am still working on my text adventure. I am having trouble with the use/with function. It is meant to call a Hash in which the key is the used object and the content includes an array; the first element in the array is the target object, and the second a Proc that will be executed if that relation turns to match the arguments for the use/with function.</p>
  
  <p>Please, may you clarify me <strong>how I can store a code block inside an array inside a hash</strong> so I can recall it later depending on the objects that are being combined?</p>
  
  <p>Here is my use function that takes "use <strong>object</strong> with <strong>with</strong>":</p>
  
  <pre><code>    def use(object, with)
      if INTERACTIONS[object][0] == with
          INTERACTIONS[object][1]
      end
  end
  </code></pre>
  
  <p>And this is how I defined the relations (so far there is just one):</p>
  
  <pre><code>INTERACTIONS = {"key" =&gt; ["clock", p = Proc.new{puts "You open the clock!"}]}
  </code></pre>
  
  <p>Whenever I type</p>
  
  <pre><code>use key with clock
  </code></pre>
  
  <p>it returns nothing but a new prompt line.</p>