Module: Rubyzen::Providers::ClassNameProvider

Overview

Provides access to the enclosing class name by traversing parent declarations.

Instance Method Summary collapse

Instance Method Details

#class_nameString?

Returns the name of the enclosing class, or nil if not within a class.

Returns:

  • (String, nil)

    the name of the enclosing class, or nil if not within a class



6
7
8
# File 'lib/rubyzen/providers/class_name_provider.rb', line 6

def class_name
  class_name_recursive(self)
end