Documenting `Data` classes
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- ruby
调研方向
首先使用 rdoc 复现文档中的示例,分别测试使用和不使用 Prism 解析器的情况,涵盖 Data.define、Struct.new 以及重新打开生成的类。跟踪这些定义的分类方式,并验证该类及其方法会作为类记录在文档中,同时不会保留过时的 Object 文档。
由索引模型根据 Issue 内容生成。
描述
rdoc does not usefully document data classes defined the correct way:
# Documenting a class made with Data.define
MyDataClass = Data.define :a do
# Capitalize the value of +a+.
def cap
a.capitalize
end
end
This documents a constant on Object, Object::MyDataClass instead of documenting it as a class itself, and the method within the data class definition is not documented either. It does not matter whether the Prism parser is used.
When documented with reopening, there are two different issues
MyDataClass = Data.define :a # :nodoc:
# Documenting a class made with Data.define
class MyDataClass
# Capitalize the value of +a+.
def cap
a.capitalize
end
end
If defined without # :nodoc:, MyDataClass is still documented as a constant on Object; if defined with # :nodoc:, the documentation is removed, but the generated documentation pages for Object isn't removed.
I believe that Data.define and Struct.new should be treated as if they were written as class variants.
- 主要语言
- Ruby
- 星标
- 929
- 派生
- 469
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 19
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/rdoc 的其他 Issue
-
RDoc 8.0.0 gem omits `doc/rdoc/example.rb`, which is referenced by the packaged markup documentation可能已有人在做 @OskarEichler 于 37 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 68/100
维护者通常 1 天内回复
-
Wrong heading levels in generated HTML?可能已有人在做 @st0012 于 2 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
eurosky-social/eu-haul#32 ·
-
good first issue
难度 2/5 1-3 小时 新手友好度 76/100
benbalter/add-to-org#17 ·
-
good first issue
难度 2/5 1-3 小时 新手友好度 76/100
benbalter/change_agent#11 ·
-
good first issue
难度 2/5 1-3 小时 新手友好度 82/100
benbalter/count-org-loc#20 ·
-
good first issue
难度 2/5 1-3 小时 新手友好度 85/100
benbalter/sitemap-parser#33 ·