Class: Hydra::ContentNegotiation::ReplacingGraphFinder

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/models/hydra/content_negotiation/replacing_graph_finder.rb

Overview

Decorator for Finder which replaces Fedora subjects in the graph with a configured URI

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(graph_finder, replacer) ⇒ ReplacingGraphFinder

Returns a new instance of ReplacingGraphFinder.



7
8
9
10
# File 'app/models/hydra/content_negotiation/replacing_graph_finder.rb', line 7

def initialize(graph_finder, replacer)
  super(graph_finder)
  @replacer = replacer
end

Instance Attribute Details

#replacerObject (readonly)

Returns the value of attribute replacer.



6
7
8
# File 'app/models/hydra/content_negotiation/replacing_graph_finder.rb', line 6

def replacer
  @replacer
end

Instance Method Details

#graphObject



12
13
14
# File 'app/models/hydra/content_negotiation/replacing_graph_finder.rb', line 12

def graph
  graph_replacer.run
end