Class: RailsAiBridge::Registry::FrontmatterParser
- Inherits:
-
Object
- Object
- RailsAiBridge::Registry::FrontmatterParser
- Defined in:
- lib/rails_ai_bridge/registry/frontmatter_parser.rb
Overview
Internal utility for extracting YAML frontmatter from skill markdown files.
Used by the resolver when a SkillEntry carries no description in tile.json
and a richer description must be sourced from the file itself.
Defined Under Namespace
Classes: ParseError, SkillMetadata
Class Method Summary collapse
-
.parse(content) ⇒ SkillMetadata
Parses YAML frontmatter from markdown content.
Class Method Details
.parse(content) ⇒ SkillMetadata
Parses YAML frontmatter from markdown content.
32 33 34 35 36 37 |
# File 'lib/rails_ai_bridge/registry/frontmatter_parser.rb', line 32 def self.parse(content) lines = extract_frontmatter_lines(content) data = parse_yaml(lines) validate_fields!(data) SkillMetadata.new(name: data['name'], version: data['version'], description: data['description']) end |