Class: Module
Overview
:nodoc: all
Instance Method Summary collapse
-
#abstract_method(*syms) ⇒ Object
abstract_method(symbol, …) extends Module defines a method which raises AbstractMethodCalled used in a base class to ensure that subclasses define an implementation thus making the base class abstract.
Instance Method Details
#abstract_method(*syms) ⇒ Object
abstract_method(symbol, …) extends Module defines a method which raises AbstractMethodCalled used in a base class to ensure that subclasses define an implementation
thus making the base class abstract
46 47 48 49 50 51 52 53 54 |
# File 'lib/rio/abstract_method.rb', line 46 def abstract_method(*syms) for symbol in syms module_eval <<-"end_eval" def #{symbol.id2name}(*args) raise AbstractMethodCalled end end_eval end end |