Class: Hash
Overview
Extensions for Ruby’s Hash
class.
Instance Method Summary collapse
-
#deep_dup ⇒ Object
Deep duplicate.
-
#optimize(**options) ⇒ Hash
A duplicate of this hash.
Instance Method Details
#deep_dup ⇒ Object
Deep duplicate
241 242 243 |
# File '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 'lib/sparql/algebra/extensions.rb', line 235 def optimize(**) self.deep_dup end |