Hey, I added a bit to your gem

Since you're in PDX, I'll buy you a beer sometime :)

This adds an 'accepts' module that does a similar-sort of typechecking for argument values - a bit more overhead since return values are always unitary and arguments come in all sorts of colors and shapes.

I'd like to ideally add the ability to delve into arrays and things like that, via passing in something along the lines of:

accepts(:method_name, [String, Time, {Symbol => Integer}])

Which would check for a method like:

def method_name(string, time, options_hash={})

And raise an error unless it was getting in a string, a time, and a hash containing zero or more symbols pointing to integers ({} or {:foo => 1} or {:bar => 1, :foo => 2})

You could also extend this to include return types, where it would be possible to pass in an expected output format such as:

returns(:method_name, [String, Time])

for

def method_name
  ["foo", Time.at(1)] # one-or-many, for return types
end

J