-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode_object.rbs
More file actions
51 lines (49 loc) · 1.34 KB
/
code_object.rbs
File metadata and controls
51 lines (49 loc) · 1.34 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
%a{annotate:rdoc:skip}
module RDoc
# <!-- rdoc-file=lib/rdoc/code_object.rb -->
# Base class for the RDoc code tree.
#
# We contain the common stuff for contexts (which are containers) and other
# elements (methods, attributes and so on)
#
# Here's the tree of the CodeObject subclasses:
#
# * RDoc::Context
# * RDoc::TopLevel
# * RDoc::ClassModule
# * RDoc::AnonClass (never used so far)
# * RDoc::NormalClass
# * RDoc::NormalModule
# * RDoc::SingleClass
# * RDoc::MethodAttr
# * RDoc::Attr
# * RDoc::AnyMethod
# * RDoc::GhostMethod
# * RDoc::MetaMethod
# * RDoc::Alias
# * RDoc::Constant
# * RDoc::Mixin
# * RDoc::Require
# * RDoc::Include
#
class CodeObject
# <!-- rdoc-file=lib/rdoc/code_object.rb -->
# Our comment
#
attr_reader comment: Comment | String
# <!--
# rdoc-file=lib/rdoc/code_object.rb
# - new()
# -->
# Creates a new CodeObject that will document itself and its children
#
def initialize: () -> void
# <!--
# rdoc-file=lib/rdoc/code_object.rb
# - comment=(comment)
# -->
# Replaces our comment with `comment`, unless it is empty.
#
def comment=: (Comment | String | nil) -> (Comment | String | nil)
end
end