Class: Rails::Generators::AIGenerator
- Inherits:
-
NamedBase
- Object
- NamedBase
- Rails::Generators::AIGenerator
- Defined in:
- lib/rails/generators/ai/ai_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_agent_file ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/rails/generators/ai/ai_generator.rb', line 10 def create_agent_file template "agent.rb", File.join("app/ai/agents", class_path, "#{file_name}.rb") in_root do if behavior == :invoke && !File.exist?(application_agent_file_name) template "application_agent.rb", application_agent_file_name end end end |