【发布时间】:2013-11-22 17:23:40
【问题描述】:
我正在查看以下代码:
module Tag
def sync_taggings_counter
::Tag.find_each do |t|
# block here
end
end
end
我对 Tag 模块中的 ::Tag 感到困惑。
我知道双冒号用于在类/模块中命名空间类和模块。但我从未见过像上面那样使用它。具体是什么意思?
【问题讨论】:
-
我错了。看看这个问题:stackoverflow.com/questions/3009477/…