Class: Object
- Inherits:
- BasicObject
- Defined in:
- vendor/bundler/ruby/3.3.0/bundler/gems/sparql-796d3be4aa08/lib/sparql/algebra/extensions.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/sxp.rb-7a771a32c5fe/lib/sxp/extensions.rb
Overview
Extensions for Ruby's Object
class.
Instance Method Summary collapse
-
#deep_dup ⇒ Object
Default for deep_dup is shallow dup.
-
#optimize(**options) ⇒ Object
A duplicate of this object.
-
#to_sparql(**options) ⇒ String
Returns a partial SPARQL grammar for this term.
-
#to_sse ⇒ Object
Make sure the object is in SXP form and transform it to a string form.
-
#to_sxp(**options) ⇒ String
Returns the SXP representation of this object.
-
#to_sxp_bin ⇒ String
Returns the SXP binary representation of this object, defaults to
self
.
Instance Method Details
#deep_dup ⇒ Object
Default for deep_dup is shallow dup
43 44 45 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-796d3be4aa08/lib/sparql/algebra/extensions.rb', line 43 def deep_dup dup end |
#optimize(**options) ⇒ Object
A duplicate of this object.
36 37 38 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-796d3be4aa08/lib/sparql/algebra/extensions.rb', line 36 def optimize(**) self.deep_dup end |
#to_sparql(**options) ⇒ String
Returns a partial SPARQL grammar for this term.
52 53 54 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-796d3be4aa08/lib/sparql/algebra/extensions.rb', line 52 def to_sparql(**) to_sxp(**) end |
#to_sse ⇒ Object
Make sure the object is in SXP form and transform it to a string form
27 28 29 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-796d3be4aa08/lib/sparql/algebra/extensions.rb', line 27 def to_sse SXP::Generator.string(self.to_sxp_bin) end |
#to_sxp(**options) ⇒ String
Returns the SXP representation of this object.
13 14 15 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sxp.rb-7a771a32c5fe/lib/sxp/extensions.rb', line 13 def to_sxp(**) to_s.to_json end |
#to_sxp_bin ⇒ String
Returns the SXP binary representation of this object, defaults to self
.
20 21 22 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-796d3be4aa08/lib/sparql/algebra/extensions.rb', line 20 def to_sxp_bin self end |