Sha256: 67b28a5a38e9e07476e35c0226544c8409c6956d5191fa5bf0fc19131bc6be7d

Contents?: true

Size: 504 Bytes

Versions: 5

Compression:

Stored size: 504 Bytes

Contents

module ActiveFedora
  class InboundRelationConnection < SimpleDelegator
    def get(*args)
      result = __getobj__.get(*args) do |req|
        prefer_headers = Ldp::PreferHeaders.new(req.headers["Prefer"])
        prefer_headers.include = prefer_headers.include | include_uris
        req.headers["Prefer"] = prefer_headers.to_s
        yield req if block_given?
      end
      result
    end

    private

    def include_uris
      [
        RDF::Fcrepo4.InboundReferences
      ]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
active-fedora-9.3.0 lib/active_fedora/inbound_relation_connection.rb
active-fedora-9.2.1 lib/active_fedora/inbound_relation_connection.rb
active-fedora-9.2.0 lib/active_fedora/inbound_relation_connection.rb
active-fedora-9.2.0.rc2 lib/active_fedora/inbound_relation_connection.rb
active-fedora-9.2.0.rc1 lib/active_fedora/inbound_relation_connection.rb