From f8ee889d4e0002dd871e0d6d5817944c23bd083d Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Wed, 24 Jun 2015 00:17:08 -0700 Subject: document install_if in Gemfile.5 [ci skip] --- man/gemfile.5.ronn | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.1