Module: SleepingKingStudios::Tools::Toolbox::Mixin
- Defined in:
- lib/sleeping_king_studios/tools/toolbox/mixin.rb
Overview
Implements recursive inheritance of both class and instance methods.
Class Method Summary collapse
-
.mixin?(othermod) ⇒ true, false
Checks if the given module is itself a Mixin.
Class Method Details
.mixin?(othermod) ⇒ true, false
Checks if the given module is itself a Mixin.
54 55 56 57 58 |
# File 'lib/sleeping_king_studios/tools/toolbox/mixin.rb', line 54 def self.mixin?(othermod) return false unless othermod.is_a?(Module) othermod.singleton_class.include?(self) end |