Class: WaxTasks::Collection
- Inherits:
-
Object
- Object
- WaxTasks::Collection
- Defined in:
- lib/wax_tasks/collection.rb,
lib/wax_tasks/collection/images.rb,
lib/wax_tasks/collection/metadata.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#ext ⇒ Object
readonly
Returns the value of attribute ext.
-
#imagedata_source ⇒ Object
readonly
Returns the value of attribute imagedata_source.
-
#metadata_source ⇒ Object
readonly
Returns the value of attribute metadata_source.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#page_source ⇒ Object
readonly
Returns the value of attribute page_source.
-
#search_fields ⇒ Object
readonly
Returns the value of attribute search_fields.
Instance Method Summary collapse
-
#initialize(name, config, source, collections_dir, ext) ⇒ Collection
constructor
A new instance of Collection.
Methods included from Images
#add_font_matter_to_json_files, #add_iiif_results_to_records, #iiif_builder, #image_variants, #items_from_imagedata, #pre_process_pdfs, #write_iiif_derivatives, #write_simple_derivatives
Methods included from Metadata
#consolidate_records, #csv_string, #json_string, #records_from_metadata, #records_from_pages, #search_fields=, #update_metadata, #yaml_string
Constructor Details
#initialize(name, config, source, collections_dir, ext) ⇒ Collection
Returns a new instance of Collection.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/wax_tasks/collection.rb', line 17 def initialize(name, config, source, collections_dir, ext) @name = name @config = config @page_extension = ext @site_source = source @page_source = Utils.safe_join source, collections_dir, "_#{name}" @metadata_source = Utils.safe_join source, '_data', config.dig('metadata', 'source') @imagedata_source = Utils.safe_join source, '_data', config.dig('images', 'source') @search_fields = %w[pid label thumbnail permalink collection] @image_variants = image_variants end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/wax_tasks/collection.rb', line 9 def config @config end |
#ext ⇒ Object (readonly)
Returns the value of attribute ext.
9 10 11 |
# File 'lib/wax_tasks/collection.rb', line 9 def ext @ext end |
#imagedata_source ⇒ Object (readonly)
Returns the value of attribute imagedata_source.
9 10 11 |
# File 'lib/wax_tasks/collection.rb', line 9 def imagedata_source @imagedata_source end |
#metadata_source ⇒ Object (readonly)
Returns the value of attribute metadata_source.
9 10 11 |
# File 'lib/wax_tasks/collection.rb', line 9 def @metadata_source end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/wax_tasks/collection.rb', line 9 def name @name end |
#page_source ⇒ Object (readonly)
Returns the value of attribute page_source.
9 10 11 |
# File 'lib/wax_tasks/collection.rb', line 9 def page_source @page_source end |
#search_fields ⇒ Object (readonly)
Returns the value of attribute search_fields.
9 10 11 |
# File 'lib/wax_tasks/collection.rb', line 9 def search_fields @search_fields end |