class YARD::Tags::VisibilityDirective
@since 0.7.0
def method2; end
# Documentation for method2
def method1; end
# Documentation for method1
# @!visibility protected
# Note that Ruby’s “protected” is recommended over this directive
@example Modifying the visibility of a set of methods
cattr_accessor :subclasses
# @!visibility private
@example Modifying the visibility of a DSL method
the visibility to all future objects in the namespace.
definition, it is applied only to that object. Otherwise, it applies
If this directive is defined on a docstring attached to an object
Modifies the current parsing visibility (public, protected, or private).
def call
def call if %w(public protected private).include?(tag.text) if object.is_a?(CodeObjects::Base) object.visibility = tag.text.to_sym elsif handler && !inside_directive? handler.visibility = tag.text.to_sym else parser.state.visibility = tag.text.to_sym end end end