module EacRubyUtils::ActsAsAbstract::InstanceMethods
def abstract_method?(method_name)
-
(Boolean)
-
Parameters:
-
method_name
(Symbol
) --
def abstract_method?(method_name) return false if self.class.method_defined?(method_name) self.class.send(:abstract_methods_hash).key?(method_name.to_sym) end
def method_missing(method_name, *arguments, &block)
def method_missing(method_name, *arguments, &block) raise_abstract_method(method_name) if abstract_method?(method_name) super end
def raise_abstract_method(method_name, arguments = [])
def raise_abstract_method(method_name, arguments = []) raise ::EacRubyUtils::UnimplementedMethodError, "Abstract method #{method_name}(#{arguments.join(', ')}) hit in " \ "#{self}\" (Class: #{self.class})" end
def respond_to_missing?(method_name, include_private = false)
def respond_to_missing?(method_name, include_private = false) super || abstract_method?(method_name) end