Module: Termtable::CoreExt::Array

Defined in:
lib/termtable/core_ext/array.rb

Instance Method Summary collapse

Instance Method Details

#__depth__(array) ⇒ Object



8
9
10
11
# File 'lib/termtable/core_ext/array.rb', line 8

def __depth__(array)
  return 0 if array == array.flatten
  1 + __depth__(array.flatten(1))
end

#depthObject



4
5
6
# File 'lib/termtable/core_ext/array.rb', line 4

def depth
  __depth__(self)
end