Class: SPARQL::Client::Update::Create

Inherits:
Operation show all
Defined in:
vendor/bundler/ruby/2.5.0/bundler/gems/sparql-client-609d9eed6a1f/lib/sparql/client/update.rb

Overview

Instance Attribute Summary collapse

Attributes inherited from Operation

#options

Instance Method Summary collapse

Methods inherited from Operation

#expects_statements?, #silent

Constructor Details

#initialize(uri, options = {}) ⇒ Create

Returns a new instance of Create

Parameters:



423
424
425
426
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-client-609d9eed6a1f/lib/sparql/client/update.rb', line 423

def initialize(uri, options = {})
  @uri = RDF::URI(uri)
  super(options)
end

Instance Attribute Details

#uriObject (readonly)

Returns the value of attribute uri



420
421
422
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-client-609d9eed6a1f/lib/sparql/client/update.rb', line 420

def uri
  @uri
end

Instance Method Details

#to_sObject



428
429
430
431
432
433
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-client-609d9eed6a1f/lib/sparql/client/update.rb', line 428

def to_s
  query_text = 'CREATE '
  query_text += 'SILENT ' if self.options[:silent]
  query_text += 'GRAPH ' + SPARQL::Client.serialize_uri(@uri)
  query_text
end