Ever wonder if a module is included?
Have you ever wondered if a certain module is included in your class, or if you are inheriting from something far up the chain. Well thats easy you can use the <, <=, >, >= operators.
Array < Enumerable
=> true
String < Integer
=> false
# okay now inheritance
User < ActiveRecord::Base
=> true
Class < Module
=> trueWritten by Jason Waldrip
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#