Sha256: bc003db09d04fda7ec75293261819c96fed029f8d1d35c28611f1a78d771eb99
Contents?: true
Size: 518 Bytes
Versions: 5
Compression:
Stored size: 518 Bytes
Contents
class ImplementationMissing < NameError; end class Object private def implementation_missing! calling_method_name = caller[1] calling_method_name = $1 if calling_method_name =~ /.*in `(.*)'$/ raise ImplementationMissing, "Implementation missing: #{self.class.name}##{calling_method_name}" end end module Kernel private def abstract_method(*syms) syms.each do |sym| define_method sym do raise ImplementationMissing, "#{self.class.name}##{sym}" end end end end
Version data entries
5 entries across 5 versions & 2 rubygems