Class: Ddr::Derivatives::Generator Abstract
- Inherits:
-
Object
- Object
- Ddr::Derivatives::Generator
- Defined in:
- lib/ddr/derivatives/generators/generator.rb
Overview
This class is abstract.
Direct Known Subclasses
Defined Under Namespace
Classes: GeneratorResult
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
-
.output_extension ⇒ Object
The extension to use for the output generated.
-
.output_mime_type ⇒ Object
The mime type of the output generated.
Instance Method Summary collapse
-
#generate(source_path, output_path) ⇒ Object
The actions required to generate the output from the source.
-
#initialize(options = nil) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(options = nil) ⇒ Generator
Returns a new instance of Generator.
10 11 12 |
# File 'lib/ddr/derivatives/generators/generator.rb', line 10 def initialize(=nil) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/ddr/derivatives/generators/generator.rb', line 6 def @options end |
Class Method Details
.output_extension ⇒ Object
The extension to use for the output generated. Implemented in each subclass
22 23 24 |
# File 'lib/ddr/derivatives/generators/generator.rb', line 22 def self.output_extension raise NotImplementedError end |
.output_mime_type ⇒ Object
The mime type of the output generated. Implemented in each subclass.
16 17 18 |
# File 'lib/ddr/derivatives/generators/generator.rb', line 16 def self.output_mime_type raise NotImplementedError end |
Instance Method Details
#generate(source_path, output_path) ⇒ Object
The actions required to generate the output from the source. Implemented in each subclass.
28 29 30 |
# File 'lib/ddr/derivatives/generators/generator.rb', line 28 def generate(source_path, output_path) raise NotImplementedError end |