-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomment.rbs
More file actions
61 lines (54 loc) · 1.74 KB
/
comment.rbs
File metadata and controls
61 lines (54 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
%a{annotate:rdoc:skip}
module RDoc
# <!-- rdoc-file=lib/rdoc/comment.rb -->
# A comment holds the text comment for a RDoc::CodeObject and provides a unified
# way of cleaning it up and parsing it into an RDoc::Markup::Document.
#
# Each comment may have a different markup format set by #format=. By default
# 'rdoc' is used. The :markup: directive tells RDoc which format to use.
#
# See RDoc::MarkupReference@Directive+for+Specifying+RDoc+Source+Format.
#
class Comment
# <!-- rdoc-file=lib/rdoc/comment.rb -->
# The format of this comment. Defaults to RDoc::Markup
#
attr_reader format: String
# <!-- rdoc-file=lib/rdoc/comment.rb -->
# The RDoc::TopLevel this comment was found in
#
attr_accessor location: String
alias file location
# <!--
# rdoc-file=lib/rdoc/comment.rb
# - new(text = nil, location = nil, language = nil)
# -->
# Creates a new comment with `text` that is found in the RDoc::TopLevel
# `location`.
#
def initialize: (?String? text, ?RDoc::Context? location, ?String? language) -> void
# <!--
# rdoc-file=lib/rdoc/comment.rb
# - format=(format)
# -->
# Sets the format of this comment and resets any parsed document
#
def format=: (String format) -> void
def normalized?: () -> bool
# <!--
# rdoc-file=lib/rdoc/comment.rb
# - normalize()
# -->
# Normalizes the text. See RDoc::Text#normalize_comment for details
#
def normalize: () -> self
# <!--
# rdoc-file=lib/rdoc/comment.rb
# - parse()
# -->
# Parses the comment into an RDoc::Markup::Document. The parsed document is
# cached until the text is changed.
#
def parse: () -> Markup::Document
end
end