Class: RecursiveOpenStruct::DeepDup

Inherits:
Object
  • Object
show all
Defined in:
lib/recursive_open_struct/deep_dup.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ DeepDup

Returns a new instance of DeepDup.



2
3
4
5
# File 'lib/recursive_open_struct/deep_dup.rb', line 2

def initialize(opts={})
  @recurse_over_arrays = opts.fetch(:recurse_over_arrays, false)
  @preserve_original_keys = opts.fetch(:preserve_original_keys, false)
end

Instance Method Details

#call(obj) ⇒ Object



7
8
9
# File 'lib/recursive_open_struct/deep_dup.rb', line 7

def call(obj)
  deep_dup(obj)
end