Class: MultiVersionCommonCartridge::Writers::ManifestResourcesWriter
- Inherits:
-
Object
- Object
- MultiVersionCommonCartridge::Writers::ManifestResourcesWriter
- Includes:
- SupportedVersions
- Defined in:
- lib/multi_version_common_cartridge/writers/manifest_resources_writer.rb
Constant Summary
Constants included from SupportedVersions
SupportedVersions::SUPPORTED_VERSIONS, SupportedVersions::UNSUPPORTED_VERSION_MSG_TEMPLATE
Instance Attribute Summary collapse
-
#cartridge ⇒ Object
readonly
Returns the value of attribute cartridge.
Instance Method Summary collapse
- #finalize ⇒ Object
-
#initialize(cartridge, factory, version) ⇒ ManifestResourcesWriter
constructor
A new instance of ManifestResourcesWriter.
- #root_resource_element ⇒ Object
Methods included from SupportedVersions
Constructor Details
#initialize(cartridge, factory, version) ⇒ ManifestResourcesWriter
Returns a new instance of ManifestResourcesWriter.
28 29 30 31 32 33 |
# File 'lib/multi_version_common_cartridge/writers/manifest_resources_writer.rb', line 28 def initialize(cartridge, factory, version) @cartridge = cartridge @factory = factory @resource_writers = {} @version = validate_version(version) end |
Instance Attribute Details
#cartridge ⇒ Object (readonly)
Returns the value of attribute cartridge.
26 27 28 |
# File 'lib/multi_version_common_cartridge/writers/manifest_resources_writer.rb', line 26 def cartridge @cartridge end |
Instance Method Details
#finalize ⇒ Object
35 36 37 |
# File 'lib/multi_version_common_cartridge/writers/manifest_resources_writer.rb', line 35 def finalize # nothing to check end |
#root_resource_element ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/multi_version_common_cartridge/writers/manifest_resources_writer.rb', line 39 def root_resource_element @root_resource_element ||= CommonCartridge::Elements::Resources::RootResource.new( resources: cartridge.all_resources.map do |resource| @factory.resource_writer(resource).resource_element end ) end |