以下代码来自Ruby on Rails.
...some code here...
unless ActionController::Base < ActionController::Testing
ActionController::Base.class_eval do
include ActionController::Testing
end
end
... some code here...
Run Code Online (Sandbox Code Playgroud)
ActionController::Base < ActionController::Testing在这种情况下意味着什么?
它是继承的测试并返回一个布尔值.
如果以下语句为真,则表示左侧是右侧的子类.
ActionController::Base < ActionController::Testing
Run Code Online (Sandbox Code Playgroud)
有关详细信息,请参阅文档
| 归档时间: |
|
| 查看次数: |
187 次 |
| 最近记录: |