Method: Inch::CodeObject::Proxy::Base#depth

Defined in:
lib/inch/code_object/proxy/base.rb

#depthFixnum

Note:

top-level counts, that’s why Foo has depth 1!

The depth of the following is 4:

Foo::Bar::Baz#initialize
 ^    ^    ^      ^
 1 << 2 << 3  <<  4

depth answers the question “how many layers of code objects are above this one?”

Returns:

  • (Fixnum)

    the depth of the object in terms of namespace



93
94
95
# File 'lib/inch/code_object/proxy/base.rb', line 93

def depth
  self[:depth]
end