Class: SPARQL::Client::QueryElement

Inherits:
Object
  • Object
show all
Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/sparql-client-464d3f76cfd5/lib/sparql/client.rb

Overview

A query element can be used as a component of a query. It may be initialized with a string, which is wrapped in an appropriate container depending on the type of QueryElement. Implements #to_s to property serialize when generating a SPARQL query.

Direct Known Subclasses

SPARQL::Client::Query::Filter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ QueryElement

Returns a new instance of QueryElement.



868
869
870
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-client-464d3f76cfd5/lib/sparql/client.rb', line 868

def initialize(*args)
  @elements = args
end

Instance Attribute Details

#elementsObject (readonly)

Returns the value of attribute elements.



866
867
868
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-client-464d3f76cfd5/lib/sparql/client.rb', line 866

def elements
  @elements
end

Instance Method Details

#to_sObject

Raises:

  • (NotImplemented)


872
873
874
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-client-464d3f76cfd5/lib/sparql/client.rb', line 872

def to_s
  raise NotImplemented
end