Module | Multiton::Inclusive |
In: |
lib/facets/supplemental/facets/multiton.rb
|
# File lib/facets/supplemental/facets/multiton.rb, line 189 def included(base) class << base ##alias_method(:new!, :new) unless method_defined?(:new!) ## gracefully handle multiple inclusions of Multiton unless include?(Multiton::MetaMethods) alias_method :new!, :new private :allocate #, :new include Multiton::MetaMethods if method_defined?(:marshal_dump) undef_method :marshal_dump warn "warning: marshal_dump was undefined since it is incompatible with the Multiton pattern" end end end end