Class: Qa::LDF::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/qa/ldf/client.rb

Overview

A client for the LD cache server

Instance Method Summary collapse

Constructor Details

#initialize {|Client| ... } ⇒ Client

Returns a new instance of Client.

Yields:

  • (Client)

    yields self to a block if given



8
9
10
# File 'lib/qa/ldf/client.rb', line 8

def initialize
  yield self if block_given?
end

Instance Method Details

#get(uri:, dataset: :'') ⇒ RDF::Graph

Parameters:

  • uri (String)

    a URI-like string

  • dataset (Symbol) (defaults to: :'')

Returns:

  • (RDF::Graph)

See Also:

  • RDF::Mutable#load
  • RDF::LinkedDataFragments::CacheServer


20
21
22
# File 'lib/qa/ldf/client.rb', line 20

def get(uri:, dataset: :'')
  RDF::Graph.load(cache_uri(uri, dataset))
end