diff options
Diffstat (limited to 'lib/erubis/util.rb')
-rw-r--r-- | lib/erubis/util.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/erubis/util.rb b/lib/erubis/util.rb new file mode 100644 index 0000000..d1611ce --- /dev/null +++ b/lib/erubis/util.rb @@ -0,0 +1,22 @@ +## +## $Release:$ +## $Copyright$ +## + +module Kernel + + ## + ## raise NotImplementedError + ## + def not_implemented #:doc: + backtrace = caller() + method_name = (backtrace.shift =~ /`(\w+)'$/) && $1 + mesg = "class #{self.class.name} must implement abstract method '#{method_name}()'." + #mesg = "#{self.class.name}##{method_name}() is not implemented." + err = NotImplementedError.new mesg + err.set_backtrace backtrace + raise err + end + private :not_implemented + +end |