Class: Hash
- 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 Hash
class.
Direct Known Subclasses
Instance Method Summary collapse
-
#deep_dup ⇒ Object
Deep duplicate.
-
#optimize(**options) ⇒ Hash
A duplicate of this hash.
-
#to_sxp(**options) ⇒ String
Returns the SXP representation of this object.
Instance Method Details
#deep_dup ⇒ Object
Deep duplicate
241 242 243 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-796d3be4aa08/lib/sparql/algebra/extensions.rb', line 241 def deep_dup inject({}) {|memo, (k, v)| memo.merge(k => v.deep_dup)} end |
#optimize(**options) ⇒ Hash
A duplicate of this hash.
235 236 237 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sparql-796d3be4aa08/lib/sparql/algebra/extensions.rb', line 235 def optimize(**) self.deep_dup end |
#to_sxp(**options) ⇒ String
Returns the SXP representation of this object.
189 190 191 |
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/sxp.rb-7a771a32c5fe/lib/sxp/extensions.rb', line 189 def to_sxp(**) to_a.to_sxp(**) end |