Class: Geoblacklight::MetadataTransformer::Base
- Inherits:
-
Object
- Object
- Geoblacklight::MetadataTransformer::Base
- Defined in:
- lib/geoblacklight/metadata_transformer/base.rb
Overview
Abstract class for transforming geospatial metadata
Instance Method Summary collapse
-
#initialize(metadata) ⇒ Base
constructor
A new instance of Base.
-
#transform ⇒ String
Returns HTML for the metadata transformed into HTML using GeoCombine.
Constructor Details
#initialize(metadata) ⇒ Base
Returns a new instance of Base.
11 12 13 14 15 |
# File 'lib/geoblacklight/metadata_transformer/base.rb', line 11 def initialize() @metadata = # Access the Nokogiri::XML Document from the metadata Object fail EmptyMetadataError, "Failed to retrieve the metadata" if @metadata.blank? end |
Instance Method Details
#transform ⇒ String
Returns HTML for the metadata transformed into HTML using GeoCombine
21 22 23 24 25 |
# File 'lib/geoblacklight/metadata_transformer/base.rb', line 21 def transform .to_html rescue => e raise TransformError, e. end |