From 8b7950e25ebe7db4ee13788714173959bf771a44 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Thu, 10 Sep 2015 21:12:11 +0900 Subject: add description of passing a block to `add_source` [ci skip] block support added in 8cc01e0b2bfa75a613720c535d34e451f5de769c --- guides/source/rails_application_templates.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'guides/source/rails_application_templates.md') diff --git a/guides/source/rails_application_templates.md b/guides/source/rails_application_templates.md index b7364536c3..edd54826cf 100644 --- a/guides/source/rails_application_templates.md +++ b/guides/source/rails_application_templates.md @@ -78,7 +78,7 @@ gem_group :development, :test do end ``` -### add_source(source, options = {}) +### add_source(source, options={}, &block) Adds the given source to the generated application's `Gemfile`. @@ -88,6 +88,14 @@ For example, if you need to source a gem from `"http://code.whytheluckystiff.net add_source "http://code.whytheluckystiff.net" ``` +If block is given, gem entries in block are wrapped into the source group. + +```ruby +add_source "http://gems.github.com/" do + gem "rspec-rails" +end +``` + ### environment/application(data=nil, options={}, &block) Adds a line inside the `Application` class for `config/application.rb`. -- cgit v1.2.3