Sha256: 35659b5fd241d0a9697e5b209275083fedd1d3d3b65c66ba3d33a43b6e90beb5
Contents?: true
Size: 280 Bytes
Versions: 6
Compression:
Stored size: 280 Bytes
Contents
class Module # Show a modules nesting in module namespaces. # # A::B::C.nesting #=> [ A, A::B ] # # CREDIT: Trans def nesting n = [] name.split(/::/).inject(self) do |mod, name| c = mod.const_get(name) ; n << c ; c end return n end end
Version data entries
6 entries across 6 versions & 2 rubygems