diff options
author | Andre Arko <andre@arko.net> | 2015-06-24 00:17:08 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-06-24 00:17:12 -0700 |
commit | f8ee889d4e0002dd871e0d6d5817944c23bd083d (patch) | |
tree | edaa75c632123cf942fa9ce47a19d9ff1778a8f4 | |
parent | e6b23f85d76f2eaa048fb83f65a8836765b731db (diff) | |
download | bundler-f8ee889d4e0002dd871e0d6d5817944c23bd083d.tar.gz |
document install_if in Gemfile.5
[ci skip]
-rw-r--r-- | man/gemfile.5.ronn | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn index 89911695fc..94458d2464 100644 --- a/man/gemfile.5.ronn +++ b/man/gemfile.5.ronn @@ -443,6 +443,16 @@ In the case of the `git` block form, the `:ref`, `:branch`, `:tag`, and `:submodules` options may be passed to the `git` method, and all gems in the block will inherit those options. +## INSTALL_IF (#install_if) + +The `install_if` method allows gems to be installed based on a proc or lambda. +This is especially useful for optional gems that can only be used if certain +software is installed or some other conditions are met. + + install_if -> { RUBY_PLATFORM =~ /darwin/ } do + gem "pasteboard" + end + ## GEMSPEC (#gemspec) If you wish to use Bundler to help install dependencies for a gem while it is |