路径 - Root 和 Path
包括 Root & Path,但 Root 已经封装了 Path, 并且只有 Root 对外提供接口。
Root
Rails.application.paths提供方法:
add
all_paths
autoload_once
autoload_paths
eager_load
load_paths和
keys
values
values_at
[]
[]=这部分内容,偏底层了。
Path
Path 元编程提供的几个方法,也挺有用的:
另,Path 行为和数组有点类似,并且它还 include Enumerable,所以部分操作也可用。
最后更新于
这有帮助吗?