lib/docrb/lib/docrb/comment_parser.rb
def infer_visibility_from_doc
      return if @components.empty?

      item = @components.first
      return unless item.is_a? TextBlock
      return unless (annotation = VISIBILITY_ANNOTATIONS.find { |_k, v| v.match?(item.text) })

      item.subs! item.text.index(":") + 1
      @meta[:doc_visibility_annotation] = annotation.first
    end
# Internal: Attempts to infer an object visiblity based on the comment's
# prefix. Supported visibility options are `public:`, `private:`, and
# `internal:`. Annotations are case-insensitive.
# This method also removes the detected annotation from the comment block,
# to reduce clutter in the emitted documentation.
Attempts to infer an object visiblity based on the comment's
prefix.
Attempts to infer an object visiblity based on the comment ' s prefix .
def infer_visibility_from_doc
      return if @components.empty?
      item = @components.first
      return unless item.is_a? TextBlock
      return unless (annotation = VISIBILITY_ANNOTATIONS.find { |_k, v| v.match?(item.text) })
      item.subs! item.text.index(":") + 1
      @meta[:doc_visibility_annotation] = annotation.first
    end
def infer_visibility_from_doc return if @components . empty? item = @components . first return unless item . is_a? TextBlock return unless ( annotation = VISIBILITY_ANNOTATIONS . find { | _k , v | v . match? ( item . text ) } ) item . subs! item . text . index ( ":" ) + 1 @meta [ :doc_visibility_annotation ] = annotation . first end
Internal: Attempts to infer an object visiblity based on the comment's
prefix.
Internal : Attempts to infer an object visiblity based on the comment ' s prefix .