It always bothered me that the #include? method in ruby treats the container (in this case, an array) as the subject of the method. in my own distorted mind it was weird not to think of the element i'm looking for as the subject.
So i did this:
def included_in?(arr = )
def not_included_in?(arr = )
a short and happy little module (Backfires into Object as you can see) and adds the #included_in? and the #notincludedin? methods to every object in the system and basically allows the following:
Initially i thought about extending the Enumerable module but for now it seemed to be enough just to expose those methods in a standalone module.