Class: SolidAgent::AgentManifest::Exporters::AgentMdExporter

Inherits:
BaseExporter
  • Object
show all
Defined in:
lib/solid_agent/agent_manifest/exporters/agent_md_exporter.rb

Overview

AgentMdExporter converts Manifests to the native .agent.md format.

Examples:

Export a manifest

content = AgentMdExporter.export(manifest)

Export with options

content = AgentMdExporter.export(manifest, include_examples: true)

Class Method Summary collapse

Class Method Details

.export(manifest, include_examples: false, include_tests: false) ⇒ String

Export manifest to .agent.md format

Parameters:

  • manifest (Manifest)

    The manifest to export

  • include_examples (Boolean) (defaults to: false)

    Include examples section

  • include_tests (Boolean) (defaults to: false)

    Include tests section

Returns:

  • (String)

    Exported content



26
27
28
29
30
31
# File 'lib/solid_agent/agent_manifest/exporters/agent_md_exporter.rb', line 26

def export(manifest, include_examples: false, include_tests: false, **)
  frontmatter = build_agent_md_frontmatter(manifest, include_examples, include_tests)
  body = build_body(manifest)

  "#{frontmatter}\n#{body}"
end

.format_nameObject



16
17
18
# File 'lib/solid_agent/agent_manifest/exporters/agent_md_exporter.rb', line 16

def format_name
  :agent_md
end