Class: Array

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

Instance Method Summary collapse

Instance Method Details

#to_nObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/array.rb', line 3

def to_n
  first = nil
  self.entries.each do |entry|
    if first.nil?
      first = entry.to_n 
    else
      first.add(entry.to_n)
    end
  end
  return first
end