Module: LLM::ActiveRecord::ActsAsAgent::Hooks
- Defined in:
- lib/llm/active_record/acts_as_agent.rb
Class Method Summary collapse
-
.extended(model)
Called when hooks are extended onto an ActiveRecord model.
Class Method Details
.extended(model)
This method returns an undefined value.
Called when hooks are extended onto an ActiveRecord model.
71 72 73 74 75 |
# File 'lib/llm/active_record/acts_as_agent.rb', line 71 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 |