Class: Array

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

Instance Method Summary collapse

Instance Method Details

#dup2Object

Duplicate each element of an Array into a new Array

[View source]

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

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

#last_iObject

[View source]

11
12
13
# File 'lib/fat_core/array.rb', line 11

def last_i
  self.size - 1
end