Module: LLM::ActiveRecord::ActsAsAgent::Hooks
- Defined in:
- lib/llm/active_record/acts_as_agent.rb
Class Method Summary collapse
-
.extended(model) ⇒ void
Called when hooks are extended onto an ActiveRecord model.
Class Method Details
.extended(model) ⇒ void
This method returns an undefined value.
Called when hooks are extended onto an ActiveRecord model.
59 60 61 62 63 |
# File 'lib/llm/active_record/acts_as_agent.rb', line 59 def self.extended(model) model.include LLM::ActiveRecord::ActsAsLLM::InstanceMethods unless model.ancestors.include?(LLM::ActiveRecord::ActsAsLLM::InstanceMethods) model.include InstanceMethods unless model.ancestors.include?(InstanceMethods) model.extend ClassMethods unless model.singleton_class.ancestors.include?(ClassMethods) end |