Class: Lutaml::UmlRepository::Exporters::BaseExporter
- Inherits:
-
Object
- Object
- Lutaml::UmlRepository::Exporters::BaseExporter
- Defined in:
- lib/lutaml/uml_repository/exporters/base_exporter.rb
Overview
Base class for all exporters.
Exporters convert a UmlRepository to various formats such as CSV, JSON, Markdown, etc. All exporters inherit from this base class and implement the [‘export`](#export) method.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#repository ⇒ UmlRepository
readonly
The repository to export.
Instance Method Summary collapse
-
#export(output_path, options = {}) ⇒ void
Export the repository to a file.
-
#initialize(repository) ⇒ BaseExporter
constructor
Initialize a new exporter.
Constructor Details
#initialize(repository) ⇒ BaseExporter
Initialize a new exporter.
28 29 30 |
# File 'lib/lutaml/uml_repository/exporters/base_exporter.rb', line 28 def initialize(repository) @repository = repository end |
Instance Attribute Details
#repository ⇒ UmlRepository (readonly)
Returns The repository to export.
23 24 25 |
# File 'lib/lutaml/uml_repository/exporters/base_exporter.rb', line 23 def repository @repository end |
Instance Method Details
#export(output_path, options = {}) ⇒ void
This method returns an undefined value.
Export the repository to a file.
38 39 40 41 |
# File 'lib/lutaml/uml_repository/exporters/base_exporter.rb', line 38 def export(output_path, = {}) raise NotImplementedError, "#{self.class.name} must implement #export" end |