Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/calc_profit/core_ext/array.rb

Instance Method Summary collapse

Instance Method Details

#dup2Object

Duplicate each element of an Array into a new Array



3
4
5
6
7
8
9
# File 'lib/calc_profit/core_ext/array.rb', line 3

def dup2
  newa = []
  self.each { |e|
    newa << e.dup
  }
  newa
end