Class: SPARQL::Client::QueryElement

Inherits:
Object
  • Object
show all
Defined in:
vendor/bundler/ruby/2.5.0/bundler/gems/sparql-client-609d9eed6a1f/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



764
765
766
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-client-609d9eed6a1f/lib/sparql/client.rb', line 764

def initialize(*args)
  @elements = args
end

Instance Attribute Details

#elementsObject (readonly)

Returns the value of attribute elements



762
763
764
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-client-609d9eed6a1f/lib/sparql/client.rb', line 762

def elements
  @elements
end

Instance Method Details

#to_sObject

Raises:

  • (NotImplemented)


768
769
770
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-client-609d9eed6a1f/lib/sparql/client.rb', line 768

def to_s
  raise NotImplemented
end