Class: Pubid::Export::FlavorExporter
- Inherits:
-
Object
- Object
- Pubid::Export::FlavorExporter
- Defined in:
- lib/pubid/export/flavor_exporter.rb
Overview
Abstract base class for per-flavor metadata extraction. Subclasses implement strategy for different Scheme patterns.
Open/Closed: New flavors add a subclass; no existing code changes. Single Responsibility: Each subclass extracts data for one Scheme pattern.
Direct Known Subclasses
DataClassExporter, IeeeExporter, ItuExporter, NistExporter, RegistryExporter, SchemeExporter
Constant Summary collapse
- WRAPPER_CLASSES =
Wrapper classes to discover per flavor (overlay patterns that wrap base identifiers)
{ iec: %i[VapIdentifier], bsi: %i[ValueAddedPublication], }.freeze
Instance Attribute Summary collapse
-
#flavor ⇒ Object
readonly
Returns the value of attribute flavor.
Instance Method Summary collapse
-
#export ⇒ Object
Subclasses must override.
-
#initialize(flavor) ⇒ FlavorExporter
constructor
A new instance of FlavorExporter.
Constructor Details
#initialize(flavor) ⇒ FlavorExporter
Returns a new instance of FlavorExporter.
21 22 23 |
# File 'lib/pubid/export/flavor_exporter.rb', line 21 def initialize(flavor) @flavor = flavor end |
Instance Attribute Details
#flavor ⇒ Object (readonly)
Returns the value of attribute flavor.
13 14 15 |
# File 'lib/pubid/export/flavor_exporter.rb', line 13 def flavor @flavor end |
Instance Method Details
#export ⇒ Object
Subclasses must override
26 27 28 |
# File 'lib/pubid/export/flavor_exporter.rb', line 26 def export raise NotImplementedError end |