Class: YARD::Tags::VisibilityDirective
- Defined in:
- lib/yard/tags/directives.rb
Overview
Modifies the current parsing visibility (public, protected, or private). If this directive is defined on a docstring attached to an object definition, it is applied only to that object. Otherwise, it applies the visibility 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
583 584 585 586 587 588 589 590 591 |
# File 'lib/yard/tags/directives.rb', line 583 def call if %w(public protected private).include?(tag.text) if object.is_a?(CodeObjects::Base) object.visibility = tag.text.to_sym else parser.state.visibility = tag.text.to_sym end end end |