gpt4 book ai didi

ruby-on-rails - 在 Ruby 注释中代表什么?

转载 作者:数据小太阳 更新时间:2023-10-29 07:07:12 27 4
gpt4 key购买 nike

查看用 Ruby 编写的源代码,比如 Rails,我经常看到小代码用 tt 标签包裹,比如 rails/activesupport/core_ext/array/access.rb

  # Equal to <tt>self[2]</tt>.
#
# %w( a b c d e).third # => "c"
def third
self[2]
end

这背后的约定是什么,何时以及为何决定使用此表示法?

最佳答案

是的,我错了,抱歉

这是特殊RDoc系统的一部分。

Non-verbatim text can be marked up:
italic: word or <em>text</em>
bold: word or <b>text</b>
typewriter: word or <tt>text</tt>

阅读更多相关信息 here

关于ruby-on-rails - <tt> 在 Ruby 注释中代表什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13971784/

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