Skip to content

Instantly share code, notes, and snippets.

@tyler-smith
Created September 6, 2012 23:38
Show Gist options
  • Save tyler-smith/3661410 to your computer and use it in GitHub Desktop.
Save tyler-smith/3661410 to your computer and use it in GitHub Desktop.
is_a_with_awesome?.awesome? ? ':)' : ':('
>> class Object
>> def is_a_with_awesome? *args
>> args.any?{|klass| self.is_a? klass }
>> end
>> end
=> nil
>> User.first.is_a_with_awesome?(User, AuditStatus)
=> true
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment