Class: Object

Inherits:
BasicObject
Defined in:
vendor/bundler/ruby/3.0.0/bundler/gems/sparql-ffa592c8f275/lib/sparql/algebra/extensions.rb,
vendor/bundler/ruby/3.0.0/bundler/gems/sxp.rb-3ed4391fdac1/lib/sxp/writer.rb

Overview

Extensions for Ruby's Object class.

Instance Method Summary collapse

Instance Method Details

#deep_dupObject

Default for deep_dup is shallow dup

Returns:



43
44
45
# File 'vendor/bundler/ruby/3.0.0/bundler/gems/sparql-ffa592c8f275/lib/sparql/algebra/extensions.rb', line 43

def deep_dup
  dup
end

#optimize(**options) ⇒ Object

A duplicate of this object.

Returns:

See Also:



36
37
38
# File 'vendor/bundler/ruby/3.0.0/bundler/gems/sparql-ffa592c8f275/lib/sparql/algebra/extensions.rb', line 36

def optimize(**options)
  self.deep_dup
end

#to_sseObject

Make sure the object is in SXP form and transform it to a string form

Returns:

  • String



27
28
29
# File 'vendor/bundler/ruby/3.0.0/bundler/gems/sparql-ffa592c8f275/lib/sparql/algebra/extensions.rb', line 27

def to_sse
  SXP::Generator.string(self.to_sxp_bin)
end

#to_sxpString

Returns the SXP representation of this object.

Returns:



12
13
14
# File 'vendor/bundler/ruby/3.0.0/bundler/gems/sxp.rb-3ed4391fdac1/lib/sxp/writer.rb', line 12

def to_sxp
  to_s.to_json
end

#to_sxp_binString

Returns the SXP binary representation of this object, defaults to self.

Returns:



20
21
22
# File 'vendor/bundler/ruby/3.0.0/bundler/gems/sparql-ffa592c8f275/lib/sparql/algebra/extensions.rb', line 20

def to_sxp_bin
  self
end