gpt4 book ai didi

ruby - 什么是|_| ruby 的意思?

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

<分区>

这是摘自 gem prawn 的片段。第二行的 |_| 是什么意思?

def canvas(&block)
init_bounding_box(block, :hold_position => true) do |_|
# Canvas bbox acts like margin_box in that its parent bounds are unset.
@bounding_box = BoundingBox.new(
self, nil, [0, page.dimensions[3]],
:width => page.dimensions[2],
:height => page.dimensions[3]
)
end
end

我正在尝试通过研究不同的 gems 来学习 ruby​​。

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