3

Can anyone explain the purpose of the "_" (underscore) in the following code? Thanks.

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

Dylan Markow
  • 123,080
  • 26
  • 284
  • 201
dakin
  • 79
  • 1
  • 4

2 Answers2

10

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
Dylan Markow
  • 123,080
  • 26
  • 284
  • 201
0

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.

tadman
  • 208,517
  • 23
  • 234
  • 262