blob: f9415fbe3244d14587f34f7db8db78a0faf45d61 [file] [edit]
module RBS
module AST
# RBS allows writing documentation of declarations and members.
#
# ```
# # This is a doc for class.
# class Hello
# end
# ```
#
class Comment
# Each line with its leading `#` and one following space removed.
# Computed from `location` on first access unless given to `initialize`.
def string: () -> String
@string: String?
attr_reader location: Location[bot, bot]?
def initialize: (?string: String?, location: Location[bot, bot]?) -> void
def ==: (untyped other) -> bool
alias eql? ==
def hash: () -> Integer
include _ToJson
private
# Must stay in sync with `parse_comment_lines` in src/parser.c.
# Slices the buffer instead of using `Location#source` so no copy is memoized on the Location.
def string_from_location: () -> String
end
end
end