Class: RubyLLM::Skills::DatabaseLoader
- Defined in:
- lib/ruby_llm/skills/database_loader.rb
Overview
Loads skills from database records.
Records must respond to: #name, #description, #content Optional: #license, #compatibility, #skill_metadata
Instance Attribute Summary collapse
-
#records ⇒ Object
readonly
Returns the value of attribute records.
Instance Method Summary collapse
-
#initialize(records) ⇒ DatabaseLoader
constructor
A new instance of DatabaseLoader.
- #list ⇒ Object
- #reload! ⇒ Object
Methods inherited from Loader
Constructor Details
#initialize(records) ⇒ DatabaseLoader
Returns a new instance of DatabaseLoader.
16 17 18 19 |
# File 'lib/ruby_llm/skills/database_loader.rb', line 16 def initialize(records) super() @records = records end |
Instance Attribute Details
#records ⇒ Object (readonly)
Returns the value of attribute records.
14 15 16 |
# File 'lib/ruby_llm/skills/database_loader.rb', line 14 def records @records end |
Instance Method Details
#list ⇒ Object
21 22 23 |
# File 'lib/ruby_llm/skills/database_loader.rb', line 21 def list skills end |
#reload! ⇒ Object
25 26 27 28 |
# File 'lib/ruby_llm/skills/database_loader.rb', line 25 def reload! @records.reload if @records.respond_to?(:reload) super end |