Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/mtk_framework/core_extensions/module/virtual_method.rb

Instance Method Summary collapse

Instance Method Details

#virtual_method(*args) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/mtk_framework/core_extensions/module/virtual_method.rb', line 4

def virtual_method(*args)
  args.each do |method_name|
    define_method(method_name) do
      raise NotImplementedError, "#{self.class.name}##{method_name} is a virtual method!"
    end
  end
end