开发者

Purpose of Underscore method in Buildr

Can anyone explain the purpose of the "_" (underscore) 开发者_JAVA技巧in the following code? Thanks.

package(:zip).include _('target/docs/*')


In Buildr, the underscore method is an alias to the path_to method:

_('foo', 'bar')
# => foo/bar
_('/tmp')
# => /tmp
_(:base_dir, 'foo')
# => /home/project1/foo


This could be a method that Buildr defines. You may need to hunt around and find it in the gem source. It's probably a helper method that expands that path specification.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜