Class: IIIFManifest::ManifestBuilder::DeepFileSetEnumerator

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/iiif_manifest/manifest_builder/deep_canvas_builder_factory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(work) ⇒ DeepFileSetEnumerator

Returns a new instance of DeepFileSetEnumerator.



14
15
16
# File 'lib/iiif_manifest/manifest_builder/deep_canvas_builder_factory.rb', line 14

def initialize(work)
  @work = work
end

Instance Attribute Details

#workObject (readonly)

Returns the value of attribute work.



12
13
14
# File 'lib/iiif_manifest/manifest_builder/deep_canvas_builder_factory.rb', line 12

def work
  @work
end

Instance Method Details

#each(&block) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/iiif_manifest/manifest_builder/deep_canvas_builder_factory.rb', line 18

def each(&block)
  file_set_presenters.each do |file_set_presenter|
    yield file_set_presenter
  end
  work_presenters.each do |work_presenter|
    self.class.new(work_presenter).each(&block)
  end
end