Methods to be added to including classes
Turn subclasses' new methods back to public.
# File lib/inversion/mixins.rb, line 116 def inherited( subclass ) subclass.module_eval { public_class_method :new } super end
Define one or more "virtual" methods which will raise NotImplementedErrors when called via a concrete subclass.
# File lib/inversion/mixins.rb, line 104 def pure_virtual( *syms ) syms.each do |sym| define_method( sym ) do |*args| raise ::NotImplementedError, "%p does not provide an implementation of #%s" % [ self.class, sym ], caller(1) end end end
Generated with the Darkfish Rdoc Generator 2.