谁能解释一下下面代码中“_”(下划线)的用途?谢谢。
package(:zip).include _('target/docs/*')
最佳答案
在 Buildr 中,underscore method is an alias to the path_to
method :
_('foo', 'bar')
# => foo/bar
_('/tmp')
# => /tmp
_(:base_dir, 'foo')
# => /home/project1/foo
关于ruby - Buildr 中 Underscore 方法的用途,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6471054/