<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>bugs/issue-e170d37de25e2a413ecb989e49071293ef3cd4e0.yaml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -10,6 +10,7 @@ TODO:
 - apply match ~before~ from
   - add match to core doodle (as 'pattern' a la XMLSchema?)
 - handle config files
+- fix duplication
 
 =end
 </diff>
      <filename>lib/doodle/app.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,10 @@
 class Doodle
+
+  # match a class signature
+  def self.match_sig(desired, actual)
+    actual.zip(desired).all?{ |a, d| a &lt;= d}
+  end
+
   # the core module of Doodle - however, to get most facilities
   # provided by Doodle without inheriting from Doodle, include
   # Doodle::Core, not this module
@@ -158,9 +164,16 @@ class Doodle
       ivar_defined?(name)
     end
 
+    # provide a hook to re-order or massage arguments before being
+    # processed by Doodle#initialize
+    def preprocess_args(*a)
+      a
+    end
+
     # object can be initialized from a mixture of positional arguments,
     # hash of keyword value pairs and a block which is instance_eval'd
     def initialize(*args, &amp;block)
+      args = preprocess_args(*args)
       built_in = Doodle::BuiltIns::BUILTINS.select{ |x| self.kind_of?(x) }.first
       if built_in
         super</diff>
      <filename>lib/doodle/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,22 +8,25 @@ class Doodle
     @@raise_exception_on_error = tf
   end
 
+  # base exception class
+  class DoodleException &lt; StandardError
+  end
   # internal error raised when a default was expected but not found
-  class NoDefaultError &lt; Exception
+  class NoDefaultError &lt; DoodleException
   end
   # raised when a validation rule returns false
-  class ValidationError &lt; Exception
+  class ValidationError &lt; DoodleException
   end
   # raised when an unknown parameter is passed to initialize
-  class UnknownAttributeError &lt; Exception
+  class UnknownAttributeError &lt; DoodleException
   end
   # raised when a conversion fails
-  class ConversionError &lt; Exception
+  class ConversionError &lt; DoodleException
   end
   # raised when arg_order called with incorrect arguments
-  class InvalidOrderError &lt; Exception
+  class InvalidOrderError &lt; DoodleException
   end
   # raised when try to set a readonly attribute after initialization
-  class ReadOnlyError &lt; Exception
+  class ReadOnlyError &lt; DoodleException
   end
 end</diff>
      <filename>lib/doodle/exceptions.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ec0af1047a59ddb1c8acf8b92d3da818bf65f419</id>
    </parent>
  </parents>
  <author>
    <name>Sean O'Halpin</name>
    <email>sean.ohalpin@gmail.com</email>
  </author>
  <url>http://github.com/seanohalpin/doodle/commit/8d6f38d913abebcd53da7c4ca6ea3175b351c7f2</url>
  <id>8d6f38d913abebcd53da7c4ca6ea3175b351c7f2</id>
  <committed-date>2009-08-07T06:11:14-07:00</committed-date>
  <authored-date>2009-08-07T06:11:14-07:00</authored-date>
  <message>exceptions should descend from StandardError not Exception</message>
  <tree>d708e6942b9c3fe24ae8b45df4f0436750e20929</tree>
  <committer>
    <name>Sean O'Halpin</name>
    <email>sean.ohalpin@gmail.com</email>
  </committer>
</commit>
