Class: SolidAgent::AgentManifest::Exporters::BaseExporter

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

Overview

BaseExporter provides common functionality for all format exporters.

Subclasses should implement:

  • .export(manifest, **options) - Convert manifest to string
  • .format_name - Return the format identifier symbol

Class Method Summary collapse

Class Method Details

.export(manifest, **options) ⇒ String

Export a manifest to string format

Parameters:

  • manifest (Manifest)

    The manifest to export

  • options (Hash)

    Format-specific options

Returns:

  • (String)

    Exported content

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/solid_agent/agent_manifest/exporters/base_exporter.rb', line 19

def export(manifest, **options)
  raise NotImplementedError, "#{self}.export must be implemented by subclass"
end

.format_nameSymbol

Get the format name for this exporter

Returns:

  • (Symbol)

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/solid_agent/agent_manifest/exporters/base_exporter.rb', line 26

def format_name
  raise NotImplementedError, "#{self}.format_name must be implemented by subclass"
end