gpt4 book ai didi

ruby - "undocumented"Ruby/Rdoc 中的常量

转载 作者:数据小太阳 更新时间:2023-10-29 08:13:03 26 4
gpt4 key购买 nike

以下代码被截取:

# ansi console color constants
COLOR_BLACK = 0
COLOR_RED = 1
COLOR_GREEN = 2
COLOR_YELLOW = 3
COLOR_BLUE = 4
COLOR_MAGENTA = 5
COLOR_CYAN = 6
COLOR_WHITE = 7

# functional color aliases
COLOR_WARN = COLOR_YELLOW
COLOR_ALERT = COLOR_RED
COLOR_CONFIRM = COLOR_GREEN
COLOR_NOTE = COLOR_BLUE

被报告为 10 个未记录的常量。有没有办法在 RDoc 中“按组注释常量”?单独记录每个常量有点愚蠢,我不想从文档中省略它们。

最佳答案

在我建议实现 :conSTList: 指令后,我从 rdoc-developer 的每封邮件中得到以下答复,这将得到 COLOR_BLACK = 0 简单地记录为 < strong>COLOR_BLACK(0):

I'll see what I can do, but I may not be able to add it to RDoc 4.0 as my time is limited.

I think I can make this work by putting the constants in a section (internally) using a separate directive that also marks them as documented for the purposes of the coverage report.

关于ruby - "undocumented"Ruby/Rdoc 中的常量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13410443/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com