Sha256: 549da4328b67a4a904381a606ce282effc61b693157309f38f5dfa3f83002248
Contents?: true
Size: 456 Bytes
Versions: 10
Compression:
Stored size: 456 Bytes
Contents
class Module # Returns the name of module's container module. # # module ::SpaceName # class Example # end # end # # SpaceName::Example.name #=> "SpaceName::Example" # SpaceName::Example.spacename #=> "SpaceName" # # This used to be called +dirname+. # # See also Module#basename. # # CREDIT: Trans def spacename name[0...(name.rindex('::') || 0)] #name.gsub(/::[^:]*$/, '') end end
Version data entries
10 entries across 9 versions & 2 rubygems