Module | Multiton::Inclusive |
In: |
lib/more/facets/multiton.rb
|
# File lib/more/facets/multiton.rb, line 189 189: def included(base) 190: class << base 191: #alias_method(:new!, :new) unless method_defined?(:new!) 192: # gracefully handle multiple inclusions of Multiton 193: unless include?(Multiton::MetaMethods) 194: alias_method :new!, :new 195: private :allocate #, :new 196: include Multiton::MetaMethods 197: 198: if method_defined?(:marshal_dump) 199: undef_method :marshal_dump 200: warn "warning: marshal_dump was undefined since it is incompatible with the Multiton pattern" 201: end 202: end 203: end 204: end