Module: LlmHub::Common::AbstractMethods::ClassMethods
- Defined in:
- lib/llm_hub/common/abstract_methods.rb
Overview
Provides class-level methods for defining abstract methods
Instance Method Summary collapse
-
#abstract_methods(*methods) ⇒ Object
Define abstract methods that must be implemented by subclasses.
Instance Method Details
#abstract_methods(*methods) ⇒ Object
Define abstract methods that must be implemented by subclasses
14 15 16 17 18 19 20 |
# File 'lib/llm_hub/common/abstract_methods.rb', line 14 def abstract_methods(*methods) methods.each do |method_name| define_method(method_name) do |*_args| raise NotImplementedError, "#{self.class}##{method_name} must be implemented" end end end |