Skip to content

Commit

Permalink
Restructuring the mutation of the Manifest Object to use "rendering"
Browse files Browse the repository at this point in the history
Removing the mutator method ManifestBuilder::FasterIIIFManifest#rendering=
  • Loading branch information
jrgriffiniii committed Oct 23, 2017
1 parent e1ef1e4 commit 103724f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
4 changes: 0 additions & 4 deletions app/services/manifest_builder/faster_iiif_manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def license=(license)
inner_hash["license"] = license
end

def rendering=(rendering)
inner_hash["rendering"] = rendering
end

def initial_attributes
{
"@context" => "http://iiif.io/api/presentation/2/context.json",
Expand Down
8 changes: 1 addition & 7 deletions app/services/manifest_builder/rendering_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ def initialize(resource)
# @return [IIIF::Presentation::Manifest]
def apply(manifest)
# This is currently here to work around https:/iiif-prezi/osullivan/issues/56
if identifier?
if manifest.is_a? FasterIIIFManifest
manifest.rendering = rendering_hash
else
manifest.insert(-1, 'rendering', rendering_hash)
end
end
manifest['rendering'] = rendering_hash if identifier?
manifest
end

Expand Down

0 comments on commit 103724f

Please sign in to comment.