Class: YARD::Tags::ScopeDirective
- Defined in:
- lib/yard/tags/directives.rb
Overview
Modifies the current parsing scope (class or instance). If this directive is defined on a docstring attached to an object definition, it is applied only to that object. Otherwise, it applies the scope to all future objects in the namespace.
Parser callbacks collapse
Constructor Details
This class inherits a constructor from YARD::Tags::Directive
Instance Method Details
#call ⇒ Object
552 553 554 555 556 557 558 559 560 |
# File 'lib/yard/tags/directives.rb', line 552 def call if %w(class instance module).include?(tag.text) if object.is_a?(CodeObjects::MethodObject) object.scope = tag.text.to_sym else parser.state.scope = tag.text.to_sym end end end |