<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,5 +18,23 @@ module Clipper
     def size
       @signatures.size
     end
+
+    def match(attribute_types, repository_types)
+      match = @signatures.detect do |signature|
+        signature.match?(attribute_types, repository_types)
+      end
+
+      if match
+        match
+      else
+        raise MatchError.new(attribute_types, repository_types)
+      end
+    end
+
+    class MatchError &lt; StandardError
+      def initialize(attribute_types, repository_types)
+        super &quot;No matching Signature found for #{attribute_types.inspect}:#{repository_types.inspect}&quot;
+      end
+    end
   end # class TypeMap
 end # module Clipper
\ No newline at end of file</diff>
      <filename>lib/clipper/type_map.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,11 +7,18 @@ class TypeMapTest &lt; Test::Unit::TestCase
     typecast_left_procedure = lambda { |age| age.to_s }
     typecast_right_procedure = lambda { |age| age.to_i }
 
-    @signature = Clipper::TypeMap::Signature.new(
+    @signature_one = Clipper::TypeMap::Signature.new(
       [String],
       [Integer],
-      typecast_left_procedure,
-      typecast_right_procedure
+      lambda { |age| age.to_s },
+      lambda { |age| age.to_i }
+    )
+
+    @signature_two = Clipper::TypeMap::Signature.new(
+      [String],
+      [String],
+      lambda { |name| name.to_s },
+      lambda { |name| name.to_s }
     )
   end
 
@@ -24,7 +31,7 @@ class TypeMapTest &lt; Test::Unit::TestCase
   def test_can_add_new_signatures
     typemap = Clipper::TypeMap.new
     assert_nothing_raised do
-      typemap &lt;&lt; @signature
+      typemap &lt;&lt; @signature_one
     end
 
     assert_raises(ArgumentError) do
@@ -36,8 +43,8 @@ class TypeMapTest &lt; Test::Unit::TestCase
     typemap = Clipper::TypeMap.new
 
     assert_nothing_raised do
-      typemap &lt;&lt; @signature
-      typemap &lt;&lt; @signature
+      typemap &lt;&lt; @signature_one
+      typemap &lt;&lt; @signature_one
     end
 
     assert_equal(1, typemap.size)
@@ -52,14 +59,21 @@ class TypeMapTest &lt; Test::Unit::TestCase
     typemap &lt;&lt; duplicate
     assert_equal(1, typemap.size)
 
-    other = Clipper::TypeMap::Signature.new(
-      [String],
-      [String],
-      lambda { },
-      lambda { }
-    )
-
-    typemap &lt;&lt; other
+    typemap &lt;&lt; @signature_two
     assert_equal(2, typemap.size)
   end
+
+  def test_matching_signature
+    typemap = Clipper::TypeMap.new
+    typemap &lt;&lt; @signature_one
+    typemap &lt;&lt; @signature_two
+
+    assert_nothing_raised do
+      assert(typemap.match([String], [Integer]).is_a?(Clipper::TypeMap::Signature))
+    end
+
+    assert_raises(Clipper::TypeMap::MatchError) do
+      typemap.match([Integer], [Integer])
+    end
+  end
 end
\ No newline at end of file</diff>
      <filename>tests/unit/type_map_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5b7e5ecfabc1f07fb1e66a0221777c20e49d87bd</id>
    </parent>
  </parents>
  <author>
    <name>Sam Smoot</name>
    <email>ssmoot@gmail.com</email>
  </author>
  <url>http://github.com/wiecklabs/clipper/commit/99d5ce0d9c50f1ebe54f607a35c69ca8dd41ba6d</url>
  <id>99d5ce0d9c50f1ebe54f607a35c69ca8dd41ba6d</id>
  <committed-date>2009-06-23T09:09:58-07:00</committed-date>
  <authored-date>2009-06-23T09:09:58-07:00</authored-date>
  <message>Finished up TypeMap.</message>
  <tree>312cdf287b616c8cc7431fa76ee12aa1a3a28dd2</tree>
  <committer>
    <name>Sam Smoot</name>
    <email>ssmoot@gmail.com</email>
  </committer>
</commit>
