Module: Rubyzen::Providers::ClassNameProvider
- Included in:
- Declarations::AttributeDeclaration, Declarations::BlockDeclaration, Declarations::CallSiteDeclaration, Declarations::ClassDeclaration, Declarations::ConstantDeclaration, Declarations::IfStatementDeclaration, Declarations::MacroDeclaration, Declarations::MethodDeclaration, Declarations::ModuleDeclaration, Declarations::ParameterDeclaration, Declarations::RaiseDeclaration, Declarations::RescueDeclaration
- Defined in:
- lib/rubyzen/providers/class_name_provider.rb
Overview
Provides access to the enclosing class name by traversing parent declarations.
Instance Method Summary collapse
-
#class_name ⇒ String?
The name of the enclosing class, or nil if not within a class.
Instance Method Details
#class_name ⇒ String?
Returns 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 |