Class: Hydra::ContentNegotiation::CleanGraphRepository
- Inherits:
-
Object
- Object
- Hydra::ContentNegotiation::CleanGraphRepository
- Defined in:
- app/models/hydra/content_negotiation/clean_graph_repository.rb
Overview
CleanGraphRepository has a #find interface which returns a graph for use with content negotiation.
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #find(id) ⇒ Object
-
#initialize(connection) ⇒ CleanGraphRepository
constructor
A new instance of CleanGraphRepository.
Constructor Details
#initialize(connection) ⇒ CleanGraphRepository
Returns a new instance of CleanGraphRepository.
6 7 8 |
# File 'app/models/hydra/content_negotiation/clean_graph_repository.rb', line 6 def initialize(connection) @connection = connection end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
5 6 7 |
# File 'app/models/hydra/content_negotiation/clean_graph_repository.rb', line 5 def connection @connection end |
Instance Method Details
#find(id) ⇒ Object
10 11 12 13 14 |
# File 'app/models/hydra/content_negotiation/clean_graph_repository.rb', line 10 def find(id) ReplacingGraphFinder.new( GraphFinder.new(connection, id) ).graph end |