Method: Unitwise::Unit#depth

Defined in:
lib/unitwise/unit.rb

#depthInteger

A number representing this unit’s distance from it’s deepest terminal atom.

Returns:

  • (Integer)


72
73
74
# File 'lib/unitwise/unit.rb', line 72

def depth
  terms.map(&:depth).max + 1
end